CVE-2026-140395
published high CVSS 4.0 · 8.7Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| gohugoio | — | hugo0.56.0 to < 0.170.0 (affected · semver) · 0.170.0 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gohugoio | hugo | 0.56.0 to < 0.170.0 (affected · semver)0.170.0 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
2- GitHub Security Advisory (GHSA-r48v-r4vw-h9v8) https://github.com/gohugoio/hugo/security/advisories/GHSA-r48v-r4vw-h9v8
- VulnCheck Advisory: Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt https://www.vulncheck.com/advisories/hugo-0.56.0-before-0.170.0-path-traversal-via-vendor-modules-txt
Provider assertions
1VulnCheck · cna
Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 7dcb948eabcfe8b58ecda89df14fd107de665d3743eb42501168030415995831
- Ingested
- 01 Dec 2026, 14:36:39 UTC
- Source record
- Official CVE record