# CVE-2026-109595: Hugo path traversal in js.Build and css.Build via ESBuild

Source: https://junglewise.ai/threats/cve-2026-109595-hugo-from-v0-84-0-before-v0-167-0-contains-a-path-traversal  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-12. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-109595 · Severity: medium · CVSS 5.5 · Published 2026-10-12

Hugo is a static site generator used to build websites. A malicious theme or module can use relative imports or symlinks to read sensitive files from the build server and publish them into the site's JavaScript or CSS, exposing confidential data to website visitors. This affects Hugo versions from 0.84.0 up to 0.167.0.

Technologies: [Hugo](https://junglewise.ai/threats/technologies/hugo). Vendors: [Hugo](https://junglewise.ai/threats/vendors/hugo).

## Quick answers

**Is CVE-2026-109595 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-109595 being exploited in the wild.

**How severe is CVE-2026-109595?** Medium severity, with a CVSS score of 5.5, published 12 October 2026.

**Which products and versions are affected?** Hugo v0.84.0 through v0.166.x.

**Is there a fix for CVE-2026-109595?** Yes: fixed in v0.167.0. Until then: Do not use themes or modules you do not trust. Review imports in js.Build, js.Batch, and css.Build entry points for paths that leave the project. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-109595 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-109595?** Check whether you run Hugo at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in v0.167.0

Do not use themes or modules you do not trust. Review imports in js.Build, js.Batch, and css.Build entry points for paths that leave the project.

## Technical details

The vulnerability exists in Hugo's js.Build, js.Batch, and css.Build functions, which delegate to ESBuild's resolver for imports not found in /assets. ESBuild reads directly from the filesystem without Hugo's security restrictions and follows symlinks, allowing a malicious theme to traverse outside the project root. An attacker ships a theme with relative imports (e.g., import secret from "../secret.txt") or symlinks pointing outside the project, which get bundled into published output readable by the build user.

## Affected products

- Hugo Hugo v0.84.0 through v0.166.x

## Timeline

- 2026-09-28: disclosed
- 2026-09-28: patched: Fixed in v0.167.0

## References

- [https://github.com/gohugoio/hugo/security/advisories/GHSA-r4xx-89rf-5424](https://github.com/gohugoio/hugo/security/advisories/GHSA-r4xx-89rf-5424)
- [https://www.vulncheck.com/advisories/hugo-0.84.0-before-0.167.0-path-traversal-via-js-build-esbuild-resolver](https://www.vulncheck.com/advisories/hugo-0.84.0-before-0.167.0-path-traversal-via-js-build-esbuild-resolver)

## Related threats

- [Hugo path traversal in css.Sass import fallback](https://junglewise.ai/threats/cve-2026-109574-hugo-before-v0-167-0-contains-a-path-traversal-vulnerability-in)
- [Hugo stored cross-site scripting in lineAnchors](https://junglewise.ai/threats/cve-2026-100691-hugo-versions-0-75-0-through-0-165-x-contain-a-stored-cross-site)
- [Hugo insufficient permission restriction via TailwindCSS](https://junglewise.ai/threats/cve-2026-89259-hugo-insufficient-permission-restriction-via-tailwindcss)
- [Hugo fenced code block attribute injection](https://junglewise.ai/threats/cve-2026-10618-hugo-fenced-code-block-attribute-injection)
- [Hugo SSRF in resources.GetRemote via security.http.urls allowlist bypass](https://junglewise.ai/threats/cve-2026-10582-hugo-ssrf-in-resources-getremote-via-security-http-urls-allowlist)
