Unescaped Code-block Renderer in Hugo Affects Static Site Generation
CVE-2026-58402

5.1MEDIUM

Key Information:

Vendor

Gohugoio

Status
Vendor
CVE Published:
6 July 2026

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

References

CVSS V4

Score:
5.1
Severity:
MEDIUM
Confidentiality:
None
Integrity:
None
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.