PT-2026-164875

CVE-2026-140394

·

Published

2026-12-01

·

Updated

2026-12-01

Description by

CVSS 3.1
5.4
Medium
MetricsAV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions Hugo versions 0.140.3 through 0.169.x
Description A stored cross-site scripting issue exists in the highlight shortcode and the transform.Highlight template function. The wrapperClass option is written unescaped into the class attribute of the wrapping div element within the writeDivStart function in markup/highlight/highlight.go. This allows content authors to provide a wrapperClass value that closes the attribute and appends a script element, leading to the execution of arbitrary JavaScript in the browsers of visitors under the site's origin. This issue bypasses the Goldmark unsafe setting because the value does not pass through the Markdown HTML renderer. Markdown code fences are not affected.
Recommendations Update Hugo to version 0.170.0 or later. As a temporary mitigation, restrict the ability of less-trusted authors to define the wrapperClass option in the highlight shortcode.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-4WHP-JX7J-XVRM
Found an issue in the description? Have something to add? Feel free to write us 👾