Skip to main content

Hugo CVE-2026-44301

MEDIUM
Path Traversal (CWE-22)
2026-05-06 https://github.com/gohugoio/hugo GHSA-x597-9fr4-5857
6.2
CVSS 4.0 · Vendor: https://github.com/gohugoio/hugo
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker crafts malicious PostCSS/Babel config
  2. Delivery
    Developer/CI clones compromised site
  3. Exploit
    hugo build invokes Node tool
  4. Execution
    Node tool executes attacker payload without fs restrictions
  5. Persist
    Arbitrary files read from host system
  6. Impact
    Sensitive 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

go github.com/gohugoio/hugo fix: 0.161.0

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

Vendor (https://github.com/gohugoio/hugo) PRIMARY 6.2 MEDIUM
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
SUSE HIGH
Red Hat 7.3 HIGH

Primary rating from Vendor (https://github.com/gohugoio/hugo).

CVSS VectorVendor: https://github.com/gohugoio/hugo

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 12, 2026 - 22:22 NVD
6.2 (MEDIUM)
CVE Published
May 06, 2026 - 20:59 nvd
MEDIUM

DescriptionCVE.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

EPSS Score
0.1%
Top 81% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

pkg:go/github.com_gohugoio_hugo

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy