# CVE-2026-58403: Hugo symlink confinement bypass in virtual filesystem

Source: https://junglewise.ai/threats/cve-2026-58403-hugo-symlink-confinement-bypass-in-virtual-filesystem  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-06. Updated: 2026-07-06  
License: CC BY 4.0 with a link back

CVE-2026-58403 · Severity: medium · CVSS 4 · Published 2026-07-06

Hugo, a popular tool for building websites, contains a security flaw that could allow unauthorized access to files on a developer's computer. If a user is tricked into using a malicious website theme or plugin containing a specially crafted shortcut (symlink), the tool may inadvertently read and expose sensitive files located outside of the project folder. This could lead to the theft of private data or credentials accessible to the user running the software.

Technologies: [github.com/gohugoio/hugo (Go)](https://junglewise.ai/threats/technologies/github-com-gohugoio-hugo), [Hugo](https://junglewise.ai/threats/technologies/hugo). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Hugo](https://junglewise.ai/threats/vendors/hugo).

## Quick answers

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

**How severe is CVE-2026-58403?** Medium severity, with a CVSS score of 4, published 6 July 2026.

**Which products and versions are affected?** github.com/gohugoio/hugo (Go) SEMVER:introduced=0.123.0,fixed=0.163.1; Hugo >= 0.123.0, < 0.163.1.

**Is there a fix for CVE-2026-58403?** Yes. github.com/gohugoio/hugo (Go): upgrade to 0.163.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-58403 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-58403?** Check whether you run github.com/gohugoio/hugo (Go) or 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

- github.com/gohugoio/hugo (Go): upgrade to 0.163.1 or later

  ```sh
  go get github.com/gohugoio/hugo@v0.163.1
  ```


## Technical details

A regression in Hugo's virtual filesystem (specifically within RootMappingFs.statRoot) caused the application to use Stat instead of Lstat. Because Stat follows symbolic links, an attacker who can place a malicious symlink within a mounted directory (such as a local theme) can bypass the intended filesystem confinement. When Hugo performs a direct file read on such a symlink, it returns the contents of the target file outside the mount tree. This vulnerability affects versions v0.123.0 through v0.163.0 and is fixed in v0.163.1. Exploitation requires the victim to process a malicious local mount or theme; themes downloaded as Go modules are not affected as symlinks are stripped during download.

## Affected products

- gohugoio Hugo >= 0.123.0, < 0.163.1

## Identifiers

- CVE-2026-58403
- GHSA-c3wq-j5vh-68rc
- GO-2026-5309

## Timeline

- 2026-06-10: patched: Fix merged into master branch
- 2026-06-11: advisory: Release v0.163.1 published
- 2026-07-06: disclosed: CVE published to NVD

## References

- [https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229](https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229)
- [https://github.com/gohugoio/hugo/pull/15020](https://github.com/gohugoio/hugo/pull/15020)
- [https://github.com/gohugoio/hugo/releases/tag/v0.163.1](https://github.com/gohugoio/hugo/releases/tag/v0.163.1)
- [https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc](https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc)

## Related threats

- [Hugo path traversal in js.Build and css.Build via ESBuild](https://junglewise.ai/threats/cve-2026-109595-hugo-from-v0-84-0-before-v0-167-0-contains-a-path-traversal)
- [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)
