CVE-2026-140394
published medium CVSS 4.0 · 5.1Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| gohugoio | — | hugo0.140.2 to < 0.170.0 (affected · semver) · 0.170.0 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.1 / 10
- Severity
- medium
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 5.4 | medium | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gohugoio | hugo | 0.140.2 to < 0.170.0 (affected · semver)0.170.0 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
2- GitHub Security Advisory (GHSA-4whp-jx7j-xvrm) https://github.com/gohugoio/hugo/security/advisories/GHSA-4whp-jx7j-xvrm
- VulnCheck Advisory: Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass https://www.vulncheck.com/advisories/hugo-0.140.2-before-0.170.0-stored-xss-via-highlight-shortcode-wrapperclass
Provider assertions
2VulnCheck · cna
Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c735a3bf5dfbc48046618935d37d72d360cc185c542e3d330fa470c4944d785c
- Ingested
- 01 Dec 2026, 15:43:13 UTC
- Source record
- Official CVE record