Go · Servers and applications
CVE-2026-140394
Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass
- Severity
- Medium 5.1
- Published
- 1 Dec 2026
- Last changed
- 1 Dec 2026
- Added to UpHeron
- 1 Dec 2026
- Fixed in
- 0.170.0
- Weakness
- Cross-site scripting (CWE-79)
- Attack
- Over the network · Needs a user account · Needs someone to view a page or file
- 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- Sources
- CVE Program
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.
Affected software
| Software | Affected versions |
|---|---|
HugoServers and applications · cna:gohugoio|hugo |
|
HugoGo · osv:Go:github.com/gohugoio/hugo |
|
About Hugo
static site and RSS generator written in Go
- Share of all websites
- 0.1%W3Techs, Nov 2026
- GitHub stars
- 90,587GitHub, 29 Nov 2026
- Forks
- 8,592GitHub, 29 Nov 2026
- Latest release
- v0.170.1GitHub, 29 Nov 2026
- Released
- 17 Nov 2026GitHub
- Developer
- Bjorn Erik PedersenWikidata
- License
- Apache License 2.0Wikidata
- Written in
- GoWikidata
- First released
- 2013Wikidata
- First published on GitHub
- 4 Jul 2013GitHub
Vulnerabilities in Hugo
- In our list
- 31
- Published in the last 12 months
- 28
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-140395Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txtHigh 8.7 1 Dec 2026
- GHSA-4whp-jx7j-xvrmHugo highlight wrapperClass option allows stored cross-site scriptingMedium 13 Nov 2026
- GHSA-r48v-r4vw-h9v8Hugo: Build-host file disclosure through path traversal in vendored module metadataMedium 13 Nov 2026
- GHSA-r73q-gwx2-fpxmHugo theme-defined module replacements bypass mount restrictions and widen the Node.js read sandboxMedium 13 Oct 2026
- CVE-2026-109597Hugo v0.60.0 before v0.167.0 Stored XSS via Table of Contents Heading IDsMedium 5.1 12 Oct 2026
- CVE-2026-109596Hugo from v0.162.0 before v0.167.0 Symlink File Disclosure via Nested Mount AncestorMedium 6.7 12 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-140394