Hugo CVE-2026-44301
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker crafts malicious PostCSS/Babel config
-
DeliveryDeveloper/CI clones compromised site
-
Exploithugo build invokes Node tool
-
ExecutionNode tool executes attacker payload without fs restrictions
-
PersistArbitrary files read from host system
-
ImpactSensitive data extracted or system compromised
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerability requires ALL of the following conditions: (1) Hugo version 0.43.0 through 0.160.x must be installed and in use. (2) The site being built must be configured to use at least one Node-based asset pipeline - specifically PostCSS, Babel, or TailwindCSS integration enabled in the Hugo config (config.toml, config.yaml, etc.). (3) The developer or automated process must execute the hugo or hugo build command against the site. (4) An attacker or malicious actor must be able to inject code into the site source, asset pipeline configuration (e.g., postcss.config.js, babel.config.js), or npm dependencies that will be executed during the build. This injection can occur via a compromised theme, plugin, package.json dependency, or direct file modification. Sites that do not use these asset pipelines, or that only build trusted sources, cannot be exploited via this path. |
| Impact | Real-world risk is MODERATE to HIGH for affected deployments, despite the absence of a CVSS vector. CVSS was not assigned, likely because this is a supply-chain/build-time vulnerability rather than a traditional runtime flaw. However, multiple risk signals confirm genuine danger: CWE-22 is a well-established path-traversal class with consistent exploitation patterns. The vulnerability requires user action (building a Hugo site), but that is routine for static site generators. The attack surface is broad (any site using PostCSS, Babel, or TailwindCSS), and exploitation does not require network access or authentication - a developer building an untrusted site locally or a CI/CD pipeline processing contributed site content can be compromised. The SSVC framework would rate this as: Exploitation=Probable (Node tool invocation is standard), Automatable=Yes (file access via Node is easily scripted), Technical Impact=High (arbitrary read/write outside project). Vendor confirmation of the patch in v0.161.0 (sourced from GitHub advisory GHSA-x597-9fr4-5857) provides strong evidence this was a genuine issue, not a theoretical concern. Patch availability reduces immediate risk for updated deployments but leaves 0.43.0-0.160.x installations vulnerable. |
| Exploit ScenarioDerived | A developer or CI/CD pipeline builds a Hugo site from an untrusted source repository (e.g., a contributed theme or plugin) that includes malicious PostCSS or Babel configuration. When hugo build is invoked, the embedded malicious Node code executes with the same filesystem permissions as the Hugo process, allowing it to read environment variables, private keys, or other sensitive files in the user's home directory or system, or to write backdoors into the build output or system directories. This scenario is particularly dangerous in shared CI/CD environments where a single compromised site dependency can compromise the entire build server. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 06, 2026
Hugo static site generator versions 0.43.0 through 0.160.x allow unrestricted file system access when building sites with Node-based asset pipelines (PostCSS, Babel, TailwindCSS), enabling arbitrary code execution through these tools to read or write files outside the project directory. The vulnerability affects only users who deploy Node asset pipelines; those building trusted sites or not using these pipelines are unaffected. A vendor-released patch in v0.161.0 enforces Node's permission model with strict filesystem defaults.
RemediationAI
Upgrade Hugo to v0.161.0 or later immediately if your site uses PostCSS, Babel, TailwindCSS, or similar Node-based asset pipelines. This release enforces Node's permission model, restricting Node tool execution to read-only access to the site source directory with no write access outside the project. As a temporary workaround if immediate upgrading is not possible, block Node tool execution by configuring security.exec.allow in your Hugo config file to deny execution of Node-based tools - consult https://gohugo.io/configuration/security/ for syntax. This workaround disables the affected asset pipeline features but eliminates the exploitation path. Test your site build thoroughly after upgrading to ensure asset pipelines function correctly under the new permission restrictions; if external Node tools require broader filesystem access, review their configuration or vendor for sandboxing alternatives.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Hugo is a static site generator written in Go that supports Node.js-based build tools for asset processing. When a user configures asset pipelines like PostCSS, Babel, or TailwindCSS, Hugo invokes these Node tools as child processes to transpile and optimize CSS and JavaScript. The vulnerability stems from CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) - Hugo was not constraining the filesystem access granted to spawned Node processes. Node.js has its own permission model (available via Node's --allow-fs-* flags and related APIs), but Hugo was invoking Node tools without applying these restrictions, allowing Node code (including malicious scripts injected into site configuration or dependencies) to traverse the filesystem and access sensitive files outside the Hugo project directory.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U
Primary rating from Vendor (https://github.com/gohugoio/hugo).
CVSS VectorVendor: https://github.com/gohugoio/hugo
Lifecycle Timeline
2DescriptionCVE.org
Impact
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Affected Products (CPE)CVE.org
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
GHSA-x597-9fr4-5857
NVD
CVE.org
EPSS
VulDB
Exploit-DB