CVE-2026-140395: Vulnerability in Gohugoio Hugo

Patch soon. 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.

CWE-22

Exploitation
None confirmed
Severity
8.7 of 10
Attack likelihood
Unknown
Fix
Fixed version known
Patch deadline
No deadline set

Details

Advisory ID
GHSA-rhmv-h4x2-hfcr
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
Weakness
CWE-22
Published
1 Dec 2026
Last change
2 Dec 2026

Affected products

Affected versions and the first fixed release

  • Gohugoio Hugo From 0.56.0 before 0.170.0. Fixed in 0.170.0

Advisories

Vendor and security advisories

Related