# CVE-2026-40470: Hackage package and doc upload stored XSS vulnerability

- Severity: Critical 9.9 (CVSS:3.1, scored by redhat-cnalr) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 27% of CVEs (2026-12-01)
- Published: 2026-01-16T11:18:20.000Z
- Modified: 2026-06-17T10:45:20.287Z
- Also known as: HSEC-2024-0004
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: redhat-cnalr

## Description

A critical XSS vulnerability affected hackage-server and
hackage.haskell.org.  HTML and JavaScript files provided in source
packages or via the documentation upload facility were served
as-is on the main hackage.haskell.org domain.  As a consequence,
when a user with latent HTTP credentials browses to the package
pages or documentation uploaded by a malicious package maintainer,
their session can be hijacked to upload packages or
documentation, amend maintainers or other package metadata, or
perform any other action the user is authorised to do.

(As written by CVE List.)

## Affected

- hackage-server: from 0.1 before 0.6
- hackage-server (Hackage): from 0.1 before 0.6

## References

- <https://osv.dev/vulnerability/HSEC-2024-0004>
- <https://github.com/haskell/hackage-server/commit/5a0dc3357b042502fcf684ed7e2464fde1407809> (fix)
- <https://github.com/haskell/hackage-server/commit/33d9ea3de9a298b21b53ba23386af2742384e627> (fix)
- <https://github.com/haskell/hackage-server/commit/354a7de3b7f21ad1346677df515d8e8ec75016e6> (fix)

## Sources

- CVE List: [CVE-2026-40470](https://www.cve.org/CVERecord?id=CVE-2026-40470), CVE Terms of Use, modified 2026-04-23
- Haskell Security Advisories: [HSEC-2024-0004](https://osv.dev/vulnerability/HSEC-2024-0004), CC0-1.0, modified 2026-04-14
- NVD: [CVE-2026-40470](https://nvd.nist.gov/vuln/detail/CVE-2026-40470), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-40470 · Whole record: https://cve.day/CVE-2026-40470.json · Rebuilt by cve.day 2026-11-25T22:59:19.391Z
