All vulnerabilities

Servers and applications

GHSA-3jfr-vjcq-7jvf

css.Sass allowed themes to read files outside the project via the Sass compiler's import fallback

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

Description

Hugo's security model states that only the main project, not external components such as themes, can access files outside the project root. css.Sass resolved @import and @use targets not found in Hugo's virtual file system by handing them to the Sass compiler (Dart Sass or LibSASS), with the real mount directories as include paths. The compiler reads directly from the file system with no notion of the project root and follows symlinks. A theme could ship a stylesheet with @import "../../../../secret";, an absolute path, or a symlink pointing outside the project, and have the file content compiled into the published CSS.

A malicious theme or Hugo module can read Sass and CSS files, or via a symlink any file, readable by the build user and publish the content as part of the site's CSS. No user interaction beyond using the theme and running a build is required.

From gohugoio/hugo's security advisory.

Workarounds

Do not use themes or modules you do not trust. Review @import and @use statements in css.Sass entry points for paths that leave the project.

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

Affected software

SoftwareAffected versions
HugoServers and applications · github:gohugoio/hugo
  • From 0.167.0 on

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