All vulnerabilities

Servers and applications

GHSA-797m-7j5g-3rpr

Symlinked mount roots in themes/modules could read files outside the module

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's symlink confinement checks stopped at the mount root itself. A theme or module checked into themes/ could therefore contain a symlink at a mount root (for example themes/mytheme/assets -> /some/dir/outside), and files behind it were readable through resources.Get, resources.Match and similar functions, and could be published to public/ via static mounts.

This bypassed the rule that theme and module mount sources must be local paths, which is part of Hugo's security model: only the main project may access files outside the project root.

Modules fetched via Go modules are not affected, as Go module zips cannot contain symlinks. The main project could already mount absolute paths by configuration, so this is not an escalation there.

From gohugoio/hugo's security advisory.

Workarounds

Inspect themes/ and vendored modules for symlinks at mount roots before building, or replace symlinks with explicit mounts.

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

Affected software

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