Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/gohugoio/hugo
  4. ›
  5. GHSA-q76j-gcg9-vxc6

GHSA-q76j-gcg9-vxc6: Hugo: XSS via unescaped code-fence language in default code block renderer

June 19, 2026

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.

References

  • github.com/advisories/GHSA-q76j-gcg9-vxc6
  • github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6

Code Behaviors & Features

Detect and mitigate GHSA-q76j-gcg9-vxc6 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 0.60.0 before 0.163.3

Fixed versions

  • 0.163.3

Solution

Upgrade to version 0.163.3 or above.

Impact 4.6 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

go/github.com/gohugoio/hugo/GHSA-q76j-gcg9-vxc6.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:32 +0000.