All vulnerabilities

Servers and applications

GHSA-x3mx-cm49-8m9c

Arbitrary file read via symlinks bypassing the Node.js permission model in css.PostCSS and other Node.js tools

Severity
Medium
Published
9 Sept 2026
Last changed
9 Sept 2026
Added to UpHeron
3 Nov 2026
Fixed in
0.166.0
Sources
Project advisories (GitHub)

Description

Hugo runs Node.js tools (css.PostCSS, css.TailwindCSS, js.Babel) with the Node.js permission model, restricting file system reads to the project directory and configured mounts. Node.js checks the lexical path only and follows symbolic links even when they point outside the allowed set. A symlink committed to the project tree therefore let a PostCSS plugin, or any other Node.js code the project runs, read arbitrary files the Hugo process could read.

Affected: v0.161.0 to v0.165.0. Before v0.161.0 there was no sandbox at all, so a PostCSS plugin could read any file directly without needing a symlink.

An attacker who can contribute content to a Hugo project (e.g. via a pull request) can commit a symlink such as assets/css/x.css -> /etc/passwd and a PostCSS plugin that reads it, exposing files and secrets available to the build environment. The contents can be embedded in the published site.

From gohugoio/hugo's security advisory. Shortened; the full text is there.

Workarounds

Do not build untrusted projects that use Node.js tools, or set security.exec.allow so that node is not permitted.

Workarounds as given by gohugoio/hugo's security advisory.

Affected software

SoftwareAffected versions
HugoServers and applications · github:gohugoio/hugo
  • From 0.161.0 before 0.166.0

About Hugo

static site and RSS generator written in Go

From Wikidata, CC0 1.0.
Share of all websites
0.1%W3Techs, Nov 2026
GitHub stars
90,472GitHub, 15 Nov 2026
Forks
8,450GitHub, 15 Nov 2026
Latest release
v0.170.0GitHub, 15 Nov 2026
Released
13 Nov 2026GitHub
Developer
Bjorn Erik PedersenWikidata
License
Apache Software License 2.0Wikidata
Written in
GoWikidata
First released
2013Wikidata
First published on GitHub
4 Jul 2013GitHub

References