REDHAT-BUG-2550016: Medium severity Hugo Hugo vulnerability
Hugo from v0.162.0 before v0.167.0 contains an improper link resolution vulnerability that lets malicious themes or modules expose files outside their root via nested-mount ancestor directories. Attackers controlling a theme can place a symlink or NTFS junction at a virtual ancestor directory, causing resources.Match to list and publish local files during builds.
Affected Software
Event History
Frequently Asked Questions
Which Hugo builds are affected?
Hugo versions from v0.162.0 up to, but not including, v0.167.0 are affected.
Who is realistically exposed to exploitation?
Build environments using a theme or module controlled by an attacker are exposed. The attacker must be able to place a symlink or NTFS junction at a virtual ancestor directory in that theme or module.
What can the attacker cause during a vulnerable build?
The crafted link can cause resources.Match to enumerate and publish local files outside the theme or module root during the build.
What can be done if upgrading is not immediately possible?
Do not use untrusted themes or modules, and review themes and modules for symlinks or NTFS junctions at virtual ancestor directories. Treat builds using externally controlled theme content as potentially exposed until Hugo is updated to v0.167.0 or later.
How can I identify potentially affected environments?
Identify Hugo installations running v0.162.0 through versions before v0.167.0, then determine whether their builds consume attacker-controlled themes or modules. Inspect those theme and module directories for symlinks or NTFS junctions that could point outside their root.