REDHAT-BUG-2550088: Medium severity Hugo Hugo vulnerability
Hugo from v0.60.0 before v0.167.0 contains a stored cross-site scripting vulnerability that allows Markdown content authors to inject HTML by supplying crafted explicit heading IDs. Attackers can break out of the unescaped href attribute in .TableOfContents or .Fragments.ToHTML output to inject elements with event handlers into rendered pages.
Affected Software
Event History
Frequently Asked Questions
Which Hugo versions are affected?
Hugo versions from v0.60.0 up to, but not including, v0.167.0 are affected. v0.167.0 is outside the affected range.
What access would an attacker need to exploit this issue?
An attacker needs the ability to supply Markdown content containing crafted explicit heading IDs. The issue is relevant where untrusted or insufficiently reviewed users can author site content.
Where can the malicious content appear in generated output?
The injection occurs when the crafted heading ID is rendered into the unescaped href attribute used by .TableOfContents or .Fragments.ToHTML output. Sites using either output path should review rendered pages generated from untrusted Markdown.