Skip to content
Medium 5.4

Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass

CVE-2026-140394 First seen on SecPulse

Affected packages

PackageAffected → Fixed
gohugoiohugo
≥ 0.140.2, < 0.170.0→ 0.170.0
Gogithub.com/gohugoio/hugo
≥ 0.140.2, < 0.170.0→ 0.170.0
Original description The description as published by the source.

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.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details