{"id":"CVE-2026-140394","summary":"Hugo 0.140.2 before 0.170.0 Stored XSS via highlight shortcode wrapperClass","details":"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.","aliases":["GHSA-4whp-jx7j-xvrm"],"modified":"2026-12-01T16:46:02.518036636Z","published":"2026-12-01T14:29:12.120Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140394.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140394.json"},{"type":"ADVISORY","url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-4whp-jx7j-xvrm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-140394"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/hugo-0.140.2-before-0.170.0-stored-xss-via-highlight-shortcode-wrapperclass"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/gohugoio/hugo","events":[{"introduced":"aae02ca612a02e085c08366a9c9279f4abb39d94"},{"fixed":"f7aa05f0f521611aa960b2da56e1870ea04f57b2"}],"database_specific":{"extracted_events":[{"strategy":"StandardRange","range":[{"introduced":"0.140.2"},{"fixed":"0.170.0"}],"source":"AFFECTED_FIELD"}]}}],"versions":["v0.169.0","v0.168.0","v0.167.0","v0.166.0","v0.165.0","v0.164.0","v0.163.3","v0.163.2","v0.163.1","v0.163.0","v0.162.1","v0.162.0","v0.161.1","v0.161.0","v0.160.1","v0.160.0","v0.159.2","v0.159.1","v0.159.0","v0.158.0","v0.157.0","v0.156.0","v0.155.3","v0.155.2","v0.155.1","v0.155.0","v0.154.5","v0.154.4","v0.154.3","v0.154.2","v0.154.1","v0.154.0","v0.153.5","v0.153.4","v0.153.3","v0.153.2","v0.153.1","v0.153.0","v0.152.2","v0.152.1","v0.152.0","v0.151.1","v0.151.0","v0.150.1","v0.150.0","v0.149.1","v0.149.0","v0.148.2","v0.148.1","v0.148.0","v0.147.9","v0.147.8","v0.147.7","v0.147.6","v0.147.5","v0.147.3","v0.147.2","v0.147.1","v0.147.0","v0.146.7","v0.146.6","v0.146.5","v0.146.4","v0.146.3","v0.146.2","v0.146.1","v0.146.0","v0.145.0","v0.144.1","v0.144.0","v0.143.1","v0.143.0","v0.142.0","v0.141.0","v0.140.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-140394.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}