Skip to main content
CVE-2026-140394VulnerabilityPublished

Hugo after 0.140.2 and before 0.170.0 contains a stored cross-site scripting vulnerability in the highlight shortcode

Source GCVE Database

0
Compare
Authoritative record:CVE-2026-140394· Medium 5.1

Not known to be exploited · CVSS 5.1 Medium : upgrade to 0.170.0 when convenient.

Data as of 1 Dec 2026, 16:30 UTC

CVSS 4.0 base score
5.1Medium
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (VulnCheck)CVSS 4.05.1
CNA (VulnCheck)CVSS 3.15.4
Patch
Available – fixed in 0.170.0
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 1 Dec 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Dec 2026.

What to do

Upgrade hugo to 0.170.0.

Affected software

ProductAffectedFixed in
gohugoiohugoAffected
  • >=0.140.2 <0.170.0
Fixed in
  • 0.170.0
Gohugopkg:golang/hugoOther threatsAffected
  • >=0.140.2 <0.170.0
Fixed in
  • 0.170.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Since the affected versions are known, users should upgrade to Hugo version 0.170.0 or later where this vulnerability is presumably fixed. Until then, restrict content authoring privileges to trusted users only to mitigate exploitation risk. Monitor the vendor advisory for official fixes and apply them promptly once available.

Description

Hugo versions after 0.140.2 and before 0.170.0 contain a stored cross-site scripting (XSS) vulnerability in the highlight shortcode and transform.Highlight template function. This flaw allows content authors to supply a crafted wrapperClass value that is written unescaped into the wrapping div's class attribute, enabling injection of script elements that execute JavaScript in visitors' browsers under the site's origin.

References

Community reviews

Loading reviews…