CVE-2026-44301: Github.com/gohugoio/hugo Hugo's Node Tool Execution Allows Vulnerability

MODERATE
Advisory Identifier: GHSA-x597-9fr4-5857
CWE-22
Published
Advisory Summary

CVE-2026-44301 is a MODERATE hugo's node tool execution allows vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/gohugoio/hugo libraries in the Go ecosystem. The issue involves hugo's node tool execution allows file system access outside the project directory. Remediation is available by upgrading affected packages to version 0.161.0.

CVE-2026-44301 at a Glance

CVE Identifier CVE-2026-44301
GHSA Identifier GHSA-x597-9fr4-5857
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/gohugoio/hugo
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-44301

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.

github.com/gohugoio/hugo fixed: 0.161.0
Upgrade github.com/gohugoio/hugo to 0.161.0
Verify Direct and Transitive Dependencies

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 CVE-2026-44301, 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.161.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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

## 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](https://gohugo.io/configuration/security/).

CVE-2026-44301 Affected Github.com/gohugoio/hugo Versions

1 component(s)
Fixed Versions:
0.161.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gohugoio/hugo
Go
≥ 0.43.0
< 0.161.0
0.161.0

References

Frequently Asked Questions

What is CVE-2026-44301?
CVE-2026-44301 is a security vulnerability in Github.com/gohugoio/hugo involving Hugo's Node tool execution allows file system access outside the project directory under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/gohugoio/hugo versions are affected?
Affected versions include releases prior to 0.161.0 across affected packages: github.com/gohugoio/hugo.
What version fixes CVE-2026-44301?
Upgrading to 0.161.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gohugoio/hugo affected?
Yes, github.com/gohugoio/hugo is affected in releases prior to 0.161.0. Upgrade your dependency to 0.161.0 or later.
What CWE is associated with CVE-2026-44301?
CVE-2026-44301 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-44301?
Run the dependency tree command: 'inspect dependencies for github.com/gohugoio/hugo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x597-9fr4-5857",
  "modified" : "2026-05-13T16:42:58Z",
  "published" : "2026-05-06T20:59:23Z",
  "aliases" : [ "CVE-2026-44301" ],
  "summary" : "Hugo's Node tool execution allows file system access outside the project directory",
  "details" : "## Impact \nWhen 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.\n\nUsers who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected.\n\n## Patches\nFrom `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.\n\n## Workarounds\nBlock these tools in [security.exec.allow](https://gohugo.io/configuration/security/).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gohugoio/hugo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.43.0"
      }, {
        "fixed" : "0.161.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gohugoio/hugo/security/advisories/GHSA-x597-9fr4-5857"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44301"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gohugoio/hugo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-06T20:59:23Z",
    "nvd_published_at" : "2026-05-12T22:16:36Z"
  }
}