Bug 2587938 (CVE-2026-140394)

Summary: CVE-2026-140394 github.com/gohugoio/hugo: hugo: Hugo: Stored cross-site scripting via unescaped wrapperClass option
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Hugo's code highlighting component. The highlight shortcode and template function fail to properly sanitize user-supplied styling options, rendering them unescaped within HTML wrapper elements. An authenticated content author can exploit this vulnerability by supplying a malicious wrapper option to insert arbitrary HTML or script code. This leads to stored Cross-Site Scripting (XSS), causing unauthorized JavaScript code to execute in the browsers of site visitors.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-12-01 14:43:11 UTC
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.