All vulnerabilities

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.

From the CVE Program.

Affected software

SoftwareAffected versions
HugoServers and applications · cna:gohugoio|hugo
  • From 0.140.2 before 0.170.0
HugoGo · osv:Go:github.com/gohugoio/hugo
  • From 0.140.2 before 0.170.0

About Hugo

static site and RSS generator written in Go

From Wikidata, CC0 1.0.
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

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-140394