# CVE-2026-140394: Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass

- Priority: **Routine**
- Reason: Not severe (CVSS 5.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-12-01 · Modified: 2026-12-01
- Aliases: DEBIAN-CVE-2026-140394, UBUNTU-CVE-2026-140394
- Record: https://cvemate.com/vulnerability/CVE-2026-140394 · JSON: https://cvemate.com/vulnerability/CVE-2026-140394/json

## Description

```text
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.
```

## Signals

- CVSS: 5.4 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.415%, percentile 37.839%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian hugo (Debian): All versions (No fix recorded)
- ubuntu hugo (Ubuntu): All versions (No fix recorded)
- gohugoio hugo: ≥ 0.140.2, \< 0.170.0

## References

- <https://github.com/gohugoio/hugo/security/advisories/GHSA-4whp-jx7j-xvrm>
- <https://www.vulncheck.com/advisories/hugo-0.140.2-before-0.170.0-stored-xss-via-highlight-shortcode-wrapperclass>
- <https://security-tracker.debian.org/tracker/CVE-2026-140394>
- <https://ubuntu.com/security/CVE-2026-140394>
- <https://www.cve.org/CVERecord?id=CVE-2026-140394>

---

Data as of 2026-12-05T10:12:57.752Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
