CVE-2026-140395 PUBLISHED

Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt

Assigner: VulnCheck
Reserved: 01.12.2026 Published: 01.12.2026 Updated: 01.12.2026

Hugo from 0.56.0 before 0.170.0 contains a path traversal vulnerability that allows malicious themes or modules to read arbitrary build host files by supplying '..' segments in _vendor/modules.txt import paths. Attackers can make Hugo treat any directory as a module root and use readFile or static mounts to publish secrets, credentials, and system files in the generated site.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
CVSS Score: 8.7

Product Status

Vendor gohugoio
Product hugo
Versions Default: unaffected
  • affected from 0.56.0 to 0.170.0 (excl.)
  • Version 0.170.0 is unaffected

Credits

  • R0X4R finder

References

Problem Types

  • Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE