All vulnerabilities

Go · Servers and applications

CVE-2026-140395

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

Severity
High 8.7
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
0.170.0
Weakness
Path traversal (CWE-22)
Attack
Over the network · No login needed · No user action needed
Attacker can
Read data
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
Sources
CVE Program

Description

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.

From the CVE Program.

Affected software

SoftwareAffected versions
HugoServers and applications · cna:gohugoio|hugo
  • From 0.56.0 before 0.170.0
HugoGo · osv:Go:github.com/gohugoio/hugo
  • From 0.56.0 before 0.170.0

About Hugo

static site and RSS generator written in Go

From Wikidata, CC0 1.0.
Share of all websites
0.1%W3Techs, Nov 2026
GitHub stars
90,587GitHub, 29 Nov 2026
Forks
8,592GitHub, 29 Nov 2026
Latest release
v0.170.1GitHub, 29 Nov 2026
Released
17 Nov 2026GitHub
Developer
Bjorn Erik PedersenWikidata
License
Apache License 2.0Wikidata
Written in
GoWikidata
First released
2013Wikidata
First published on GitHub
4 Jul 2013GitHub

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-140395