Unescaped Code-block Renderer in Hugo Affects Static Site Generation
CVE-2026-58402
5.1MEDIUM
What is CVE-2026-58402?
A vulnerability in Hugo allows for script injection due to the unescaped Markdown code-block renderer present in versions 0.60.0 to 0.163.3. This flaw can lead to attackers executing arbitrary JavaScript by injecting malicious scripts into code blocks, exposing users to XSS attacks. The vulnerability has been addressed in version 0.163.3, which properly escapes the input, thus eliminating the risk.
Affected Version(s)
hugo >= 0.60.0, < 0.163.3
