REDHAT-BUG-2550039: Path Traversal
Hugo before v0.167.0 contains a path traversal vulnerability in css.Sass that allows malicious themes or modules to read files outside the project root through the Sass compiler's import fallback. Attackers can ship stylesheets with relative, absolute, or symlinked @import or @use targets to compile readable files into the published site CSS.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Hugo users who build sites with css.Sass and compile themes or modules that may contain untrusted or malicious Sass stylesheets are exposed. A malicious theme or module can cause readable files outside the project root to be incorporated into published site CSS.
What does an attacker need to exploit it?
The attacker needs to provide or influence a theme or module stylesheet processed by css.Sass. The stylesheet can use relative, absolute, or symlinked @import or @use targets to reach files outside the project root.
Are installations using the default configuration affected?
The available information identifies css.Sass processing as the affected condition; it does not establish whether a default Hugo configuration invokes it. Sites that do not compile attacker-controlled Sass themes or modules are not described as an exploitation path.
How can I tell whether a site may already be affected?
Review Sass files in installed themes and modules for @import or @use directives that reference relative, absolute, or symlinked paths outside the project root. Also inspect generated published CSS for content that appears to originate from local readable files.