mediumVulnerability

GHSA-q76j-gcg9-vxc6

Hugo's default code-block renderer wrote the Markdown code-fence language / info-string into the `<code class="language-…" data-lang="…">` wrapper without HTML escaping. A fence info-string containing a quote and a `<script>` payload breaks out of the attribute and injects a live script element. This is not an issue if you fully trust every file under /content and every content adapter you load.

Properties

ghsa_id
GHSA-q76j-gcg9-vxc6
severity
medium
summary
Hugo: XSS via unescaped code-fence language in default code block renderer
cve_id
GHSA-q76j-gcg9-vxc6
is_ghsa_only
true
ghsa_published
2026-06-19T17:45:27Z
source_url
https://github.com/advisories/GHSA-q76j-gcg9-vxc6
ghsa_updated
2026-06-19T17:45:28Z

Related Entities (4)

HAS_WEAKNESS (1)

[Weakness]Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]go/github.com/gohugoio/hugo

AFFECTS (1)

[Software]go/github.com/gohugoio/hugo

Explore deeper with Ninja Signal's threat intelligence graph