Advisory

GHSA-x597-9fr4-5857

Also known as: CVE-2026-44301, GO-2026-5740

Summary

Hugo's Node tool execution allows file system access outside the project directory

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-05-06 20:59 UTC
Modified
2026-07-24 19:11 UTC

Affected packages and fixes

github.com/gohugoio/hugo

Go · All systems

Affected

  • introduced 0.43.0, fixed 0.161.0 (semver)

Fixed versions

0.161.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences