CVE-2026-40472 Hackage package metadata stored XSS vulnerability
Attackers can inject malicious scripts via package metadata, leading to stored XSS and potential account takeover on the Hackage server.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-40472?
CVE-2026-40472 is a critical cross-site scripting vulnerability in hackage-server, published on 23 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2026-40472?
1 open source package ship an affected version, including hackage-server.
| Package | Affected | Fixed in |
|---|---|---|
hackage-server Hackage | From 0.1 | None |
How do I fix CVE-2026-40472?
No fix has been published for CVE-2026-40472 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-40472 being exploited?
There is no known exploitation of CVE-2026-40472 in the wild and no public exploit code.
Sources
Also known as GHSA-8fw8-47cx-j4q4, HSEC-2026-0004.