Vulnerability · CVE-2026-40472
Hackage package metadata stored XSS vulnerability
Published Mar 28, 2026 · catalog updated Jun 17, 2026 · Hackage package metadata stored
Check if you run it
No confirmed exploitation is on record for CVE-2026-40472. EPSS is 0.43%. Act only if a listed version of Hackage package metadata stored is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Hackage package metadata stored).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- Critical9.9
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.43%
- Remediation
- Not established
- Affected products
- Hackage hackage-server
# Hackage package metadata stored XSS vulnerability User-controlled metadata from files are rendered into HTML attributes without proper sanitization, enabling stored Cross-Site Scripting (XSS) attacks. The specific fields affected are: - - - - (Haddock hyperlinks) The Haskell Security Response Team audited the entire corpus of **published** packages on —all published package versions but *not* candidates. No exploitation attempts were detected. To fix the issue, *hackage-server* now inspects target URIs and only produces a hyperlink when the URI has an approved scheme: , , and (only for some fields) . The fix has been [committed][commit] and deployed on . Other operations of *hackage-server* instances should update as soon as possible to commit or later. ## Acknowledgements - **Joshua Rogers** (https://joshua.hu/) of AISLE (https://aisle.com/) reported the issue to the Haskell Security Response Team. - **Fraser Tweedale** implemented the fix. - **Gershom Bazerman** merged the fix and deployed it to . [commit]: https://github.com/haskell/hackage-server/commit/2de3ae45082f8f3f29a41f6aff620d09d0e74058
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- Hackage hackage-server0.4, 0.5.0
- Hackage hackage-serverfrom 0.1
How to fix CVE-2026-40472
Recommended remediation
No required-action text, fix commit, or clear fixed-version range is stored yet.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-40472. EPSS is 0.43%. Act only if a listed version of Hackage package metadata stored is installed.
Which versions are affected?
Compare what you have installed with 0.4, 0.5.0, from 0.1. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-79: Cross-site Scripting (XSS). EPSS 0.43%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Mar 28, 2026 · OpenSSF OSV / OSV Scanner
Detected
# Hackage package metadata stored XSS vulnerability User-controlled metadata from files are rendered into HTML attributes without proper sanitization, enabling stored Cross-Site Scripting (XSS) attacks. The specific fields affected are: - - - - (Haddock hyperlinks) The Haskell Security Response Team audited the entire corpus of **published** packages on —all published package versions but *not* ca
Apr 14, 2026 · OpenSSF OSV / OSV Scanner
Updated
# Hackage package metadata stored XSS vulnerability User-controlled metadata from files are rendered into HTML attributes without proper sanitization, enabling stored Cross-Site Scripting (XSS) attacks. The specific fields affected are: - - - - (Haddock hyperlinks) The Haskell Security Response Team audited the entire corpus of **published** packages on —all published package versions but *not* ca
Jun 17, 2026 · NIST NVD
Updated
In hackage-server, user-controlled metadata from .cabal files are rendered into HTML href attributes without proper sanitization, enabling stored Cross-Site Scripting (XSS) attacks.
Sources
- CVE.orgVulnerability recordCVE-2026-40472
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-40472
30-day exploitation probability 0.4%
first.org - NIST NVDVulnerability recordCVE-2026-40472
In hackage-server, user-controlled metadata from .cabal files are rendered into HTML href attributes without proper sanitization, enabling stored Cross-Site Scripting (XSS) attacks.
nvd.nist.gov - OpenSSF OSV / OSV ScannerPackage advisoryHSEC-2026-0004
Hackage package metadata stored XSS vulnerability
osv.dev
References
Freshness
Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.