# CVE-2026-140395: Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-12-01T02:23:54.000Z
- Modified: 2026-12-01T16:11:17.277Z
- Also known as: GHSA-r48v-r4vw-h9v8
- Weaknesses: CWE-22
- Assigned by: 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.

(As written by CVE List.)

## Affected

- gohugoio hugo: from 0.56.0 before 0.170.0 (not affected: 0.170.0)
- github.com/gohugoio/hugo (Go): from 0.56.0 before 0.170.0

## Every score

- VulnCheck: CVSS:4.0 8.7 High `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`
- VulnCheck: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/gohugoio/hugo/security/advisories/GHSA-r48v-r4vw-h9v8> (vendor-advisory, web)
- <https://www.vulncheck.com/advisories/hugo-0.56.0-before-0.170.0-path-traversal-via-vendor-modules-txt> (third-party-advisory)
- <https://github.com/gohugoio/hugo/pull/15564> (web)
- <https://github.com/gohugoio/hugo/commit/d41a8a196e6b2fd5e5aa886c790d6c679dd73be0> (web)
- <https://github.com/gohugoio/hugo> (package)
- <https://github.com/gohugoio/hugo/releases/tag/v0.170.0> (web)

## Sources

- CVE List: [CVE-2026-140395](https://www.cve.org/CVERecord?id=CVE-2026-140395), CVE Terms of Use, modified 2026-12-01
- GitHub Advisory Database: [GHSA-r48v-r4vw-h9v8](https://github.com/advisories/GHSA-r48v-r4vw-h9v8), CC-BY-4.0, modified 2026-12-01
- NVD: [CVE-2026-140395](https://nvd.nist.gov/vuln/detail/CVE-2026-140395), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-140395 · Whole record: https://cve.day/CVE-2026-140395.json · Rebuilt by cve.day 2026-12-01T16:27:08.948Z
