Hugo is a static site generator. From 0.43 to before 0.161.0, when building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory. Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected. This vulnerability is fixed in 0.161.0.
Hugo: Node tool execution allows file system access outside the project directory
Problem type
Affected products
gohugoio
>= 0.43.0, < 0.161.0 - AFFECTED
References
GitHub Security Advisories
GHSA-x597-9fr4-5857
Hugo's Node tool execution allows file system access outside the project directory
https://github.com/advisories/GHSA-x597-9fr4-5857Impact
When building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory.
Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected.
Patches
From v0.161.0, Hugo runs Node tools under Node's permission model with strict defaults: No write access and only read access to the site source directories and files.
Workarounds
Block these tools in security.exec.allow.
JSON source
https://cveawg.mitre.org/api/cve/CVE-2026-44301Click to expand
{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2026-44301",
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"dateUpdated": "2026-05-12T21:37:52.825Z",
"dateReserved": "2026-05-05T17:39:31.113Z",
"datePublished": "2026-05-12T21:37:52.825Z",
"state": "PUBLISHED"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-05-12T21:37:52.825Z"
},
"title": "Hugo: Node tool execution allows file system access outside the project directory",
"descriptions": [
{
"lang": "en",
"value": "Hugo is a static site generator. From 0.43 to before 0.161.0, when building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory. Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected. This vulnerability is fixed in 0.161.0."
}
],
"affected": [
{
"vendor": "gohugoio",
"product": "hugo",
"versions": [
{
"version": ">= 0.43.0, < 0.161.0",
"status": "affected"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')",
"cweId": "CWE-22",
"type": "CWE"
}
]
}
],
"references": [
{
"url": "https://github.com/gohugoio/hugo/security/advisories/GHSA-x597-9fr4-5857",
"name": "https://github.com/gohugoio/hugo/security/advisories/GHSA-x597-9fr4-5857",
"tags": [
"x_refsource_CONFIRM"
]
}
],
"metrics": [
{}
]
}
}
}