NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

Hugo theme-defined module replacements bypass mount restrictions and widen the Node.js read sandboxGHSA-r73q-gwx2-fpxm

Fix: gohugoio/hugo#15426

GHSA-r73q-gwx2-fpxm is a security vulnerability in github.com/gohugoio/hugo. A fix is available for github.com/gohugoio/hugo — see the affected versions and patch details below.

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 30, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐹github.com/gohugoio/hugo

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

A theme or module could define its own module.replacements and mount directories anywhere on the host.

Details

A theme or module could define its own module.replacements. If the project didn't set any replacements, Hugo applied the theme's replacements as if the project had set them. The theme could then import and mount a directory anywhere on the host, either by absolute path or by escaping themesDir with ../. This got around the rule that theme mount sources must be local paths.

Mounting such a directory as assets also added it to the Node.js --allow-fs-read roots. That widened the security.node.permissions sandbox. For example, Node tools such as css.PostCSS could read files from that directory and load JavaScript modules from it.

Only sites that use an untrusted theme or module are affected.

Proof of concept

Create a theme as outlined in the Go test below:

func TestMountRestrictThemeReplacements(t *testing.T) {
    files := `
-- hugo.toml --
disableKinds = ["taxonomy", "term", "rss"]
theme = "mytheme"
-- themes/mytheme/hugo.toml --
[module]
replacements = "evil -> ../../secret"
[[module.imports]]
path = "evil"
[[module.imports.mounts]]
source = "."
target = "assets"
-- secret/file1.txt --
file1
-- layouts/all.html --
All.
`
    b, err := hugolib.TestE(t, files)
    b.Assert(err, qt.IsNotNil)
    b.Assert(err.Error(), qt.Contains, `module "evil" not found in "/themes/evil"`)
}

Impact

A theme could read files outside its sandbox.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/gohugoio/hugo≥ 0.152.0&&< 0.168.00.168.0go get github.com/gohugoio/hugo@v0.168.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/gohugoio/hugo, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/gohugoio/hugo to 0.168.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r73q-gwx2-fpxm is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Summary A theme or module could define its own `module.replacements` and mount directories anywhere on the host. ### Details A theme or module could define its own `module.replacements`. If the project didn't set any replacements, Hugo applied the theme's replacements as if the project had set them. The theme could then import and mount a directory anywhere on the host, either by absolute path or by escaping `themesDir` with `../`. This got around the rule that theme mount sources must be local paths. Mounting such a directory as `assets` also added it to the Node.js `--allow-fs-read`
O3 Security · Impact-Aware SCA

Is GHSA-r73q-gwx2-fpxm in your dependencies?

Find it across Go, including transitive dependencies.

Hugo theme-defined module replacements bypass mount…