Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass
- CVE-2026-140394
- GHSA-332r-53xh-x52j
- GHSA-4whp-jx7j-xvrm
- EUVD-2026-140249
Description
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.
Text from the CVE.org record.
Recommendation
gohugoio hugo
- If you run a version from 0.140.2 to before 0.170.0update to 0.170.0 or laterMajor version change: expect breaking changes
github.com/gohugoio/hugo
- If you run a version from 0.140.2 to before 0.170.0update to 0.170.0 or laterMajor version change: expect breaking changesgithub.com/gohugoio/hugo 0.170.0 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
gohugoio hugo
Affected versions Fixed in from 0.140.2 to before 0.170.0 0.170.0 github.com/gohugoio/hugoGo
Affected versions Fixed in from 0.140.2 to before 0.170.0 0.170.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.