CVE-2026-140394

Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass

Published Dec 1, 2026 CVSS 4.0 · 5.1 Medium EPSS n/a KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass
First Time appeared Gohugo
Gohugo hugo
Weaknesses CWE-79
CPEs cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*
Vendors & Products Gohugo
Gohugo hugo
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Dec 1, 2026, 3:41 PM
Reserved
Dec 1, 2026, 3:08 AM
Status
Awaiting Analysis
Published
Dec 1, 2026, 3:18 PM
Modified
Dec 1, 2026, 4:18 PM