GHSA-q76j-gcg9-vxc6

Suggest an improvement
Source
https://github.com/advisories/GHSA-q76j-gcg9-vxc6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-q76j-gcg9-vxc6/GHSA-q76j-gcg9-vxc6.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-q76j-gcg9-vxc6
Aliases
Downstream
MINI (2)
Published
2026-06-19T17:45:27Z
Modified
2026-07-24T19:26:08Z
Severity
  • 5.1 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
Hugo: XSS via unescaped code-fence language in default code block renderer
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-06-19T17:45:27Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

Go / github.com/gohugoio/hugo

Package

Name
github.com/gohugoio/hugo
View open source insights on deps.dev
Purl
pkg:golang/github.com/gohugoio/hugo

Affected ranges

Type
SEMVER
Events
Introduced
0.60.0
Fixed
0.163.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-q76j-gcg9-vxc6/GHSA-q76j-gcg9-vxc6.json"