All vulnerabilities

Servers and applications

GHSA-6c8w-mpp8-9w47

Symlink in nested-mount ancestor directory of a theme exposes files outside the module

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

Description

When a module mount is nested below another mount (e.g. assets and assets/vendor/x), Hugo enumerates the intermediate "virtual ancestor" directory (assets/vendor) by joining the path onto the parent mount and calling Stat, which follows symlinks. This path did not apply the symlink confinement rules used elsewhere in the root mapping filesystem.

A malicious or compromised theme/module can place a symlink (or NTFS junction) at that ancestor directory pointing outside its own root. Files from the link target are then listed by resources.Match and similar, and their content is readable during the build, so it can end up in the published output.

The attacker must control a theme/module used by the victim site. Impact is limited to local file disclosure during the build.

From gohugoio/hugo's security advisory.

Workarounds

Do not use themes or modules from untrusted sources. Inspect vendored themes for symlinks or junctions in mounted directories before building.

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

Affected software

SoftwareAffected versions
HugoServers and applications · github:gohugoio/hugo
  • From 0.162.0 before 0.167.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