GHSA-r73q-gwx2-fpxm: Github.com/gohugoio/hugo Hugo Theme-defined Module Replacements Bypass Vulnerability
MODERATEGHSA-r73q-gwx2-fpxm is a MODERATE hugo theme-defined module replacements bypass vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/gohugoio/hugo libraries in the Go ecosystem. The issue involves hugo theme-defined module replacements bypass mount restrictions and widen the node.js read sandbox. Remediation is available by upgrading affected packages to version 0.168.0.
GHSA-r73q-gwx2-fpxm at a Glance
How to Fix GHSA-r73q-gwx2-fpxm
To remediate this vulnerability, upgrade all affected Github.com/gohugoio/hugo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/gohugoio/hugo to 0.168.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gohugoio/hugo
How to Check if You Are Affected
To determine whether your application is affected by GHSA-r73q-gwx2-fpxm, inspect your project dependencies for Github.com/gohugoio/hugo:
inspect dependencies for github.com/gohugoio/hugo
Analyze the terminal output to locate any version of Github.com/gohugoio/hugo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.168.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/gohugoio/hugo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-r73q-gwx2-fpxm Affected Github.com/gohugoio/hugo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gohugoio/hugo
|
Go |
≥ 0.152.0
< 0.168.0
|
0.168.0
|
References
Frequently Asked Questions
What is GHSA-r73q-gwx2-fpxm?
Which Github.com/gohugoio/hugo versions are affected?
What version fixes GHSA-r73q-gwx2-fpxm?
Is github.com/gohugoio/hugo affected?
What CWE is associated with GHSA-r73q-gwx2-fpxm?
How can I check Go dependencies for GHSA-r73q-gwx2-fpxm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r73q-gwx2-fpxm",
"modified" : "2026-11-30T21:49:32Z",
"published" : "2026-11-30T21:49:32Z",
"aliases" : [ ],
"summary" : "Hugo theme-defined module replacements bypass mount restrictions and widen the Node.js read sandbox",
"details" : "### Summary\n\nA theme or module could define its own `module.replacements` and mount directories anywhere on the host.\n\n### Details\n\nA 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.\n\nMounting 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.\n\nOnly sites that use an untrusted theme or module are affected.\n\n### Proof of concept\n\nCreate a theme as outlined in the Go test below:\n\n```go\nfunc TestMountRestrictThemeReplacements(t *testing.T) {\n files := `\n-- hugo.toml --\ndisableKinds = [\"taxonomy\", \"term\", \"rss\"]\ntheme = \"mytheme\"\n-- themes/mytheme/hugo.toml --\n[module]\nreplacements = \"evil -> ../../secret\"\n[[module.imports]]\npath = \"evil\"\n[[module.imports.mounts]]\nsource = \".\"\ntarget = \"assets\"\n-- secret/file1.txt --\nfile1\n-- layouts/all.html --\nAll.\n`\n b, err := hugolib.TestE(t, files)\n b.Assert(err, qt.IsNotNil)\n b.Assert(err.Error(), qt.Contains, `module \"evil\" not found in \"/themes/evil\"`)\n}\n```\n\n### Impact\n\nA theme could read files outside its sandbox.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gohugoio/hugo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.152.0"
}, {
"fixed" : "0.168.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/security/advisories/GHSA-r73q-gwx2-fpxm"
}, {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/pull/15426"
}, {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/commit/6883b55ad59e0daa1aaba0cf2b66db1132202e2c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gohugoio/hugo"
}, {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/releases/tag/v0.168.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-30T21:49:32Z",
"nvd_published_at" : null
}
}