CVE-2026-140394 PUBLISHED

Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass

Assigner: VulnCheck
Reserved: 01.12.2026 Published: 01.12.2026 Updated: 01.12.2026

Hugo after 0.140.2 and before 0.170.0 contains a stored cross-site scripting vulnerability in the highlight shortcode and transform.Highlight template function, which write the wrapperClass option unescaped into the wrapping div's class attribute. Content authors can supply a wrapperClass value that closes the attribute and appends a script element, executing JavaScript in visitors' browsers under the site's origin.

Metrics

CVSS Vector: 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 Score: 5.1

Product Status

Vendor gohugoio
Product hugo
Versions Default: unaffected
  • affected from 0.140.2 to 0.170.0 (excl.)
  • Version 0.170.0 is unaffected

Credits

  • R0X4R finder

References

Problem Types

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