Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L
Requires a low-privileged maintainer account (PR:L) and a victim browsing the malicious page (UI:R); same-origin stored XSS crosses trust boundary (S:C) enabling session theft and package tampering (C:H/I:H), with no real availability loss (A:N).
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
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.
AnalysisAI
Stored cross-site scripting in hackage-server (the software powering hackage.haskell.org) allowed HTML and JavaScript embedded in source packages or documentation uploads to be served unsanitized from the primary hackage.haskell.org origin. A low-privileged, authenticated package maintainer could plant a malicious payload so that any authenticated user visiting the affected package or documentation pages would have their active session hijacked, letting the attacker upload packages/docs, alter maintainer lists and metadata, or perform any action the victim is authorized to do. There is no public exploit identified at time of analysis, and EPSS is very low (0.05%), but the CVSS 9.9 rating reflects the total technical impact of a same-origin XSS on a central package-signing authority.
Technical ContextAI
The affected component is hackage-server, the Haskell open-source software behind the central package archive hackage.haskell.org. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation): attacker-supplied HTML/JS contained in uploaded source tarballs or documentation bundles was returned with an active content type on the main application domain rather than being sanitized, sandboxed, or served from an isolated origin. Because the scripts execute in the security context of hackage.haskell.org itself, they gain access to the victim's authenticated session for that origin - the classic danger of serving user-controlled documentation/artifacts from the same origin that also handles privileged upload and metadata-management actions.
Affected ProductsAI
The vulnerability affects hackage-server, the Haskell package-repository server software, and the production deployment at hackage.haskell.org (the central Haskell package archive). No specific version range or CPE string was provided in the source data; affected versions should be confirmed via the Haskell Security Advisories entry referenced at https://osv.dev/vulnerability/HSEC-2024-0004 and the aggregated advisories at https://nvd.nist.gov/vuln/detail/CVE-2026-40470 and https://vuldb.com/vuln/359152. Private or mirrored hackage-server instances built from affected code would share the same exposure.
RemediationAI
No vendor-released patch version is identified in the provided data; consult the Haskell Security Advisory HSEC-2024-0004 (https://osv.dev/vulnerability/HSEC-2024-0004) for the fixed hackage-server release and apply it - the central hackage.haskell.org instance is operator-controlled and would have been remediated server-side. The core fix is to stop serving user-uploaded HTML/JS from the primary origin: serve documentation and package-provided HTML from a separate sandbox domain, and/or force a non-rendering content type (e.g., text/plain or Content-Disposition: attachment) plus a restrictive Content-Security-Policy that disallows inline script on the main domain. As interim compensating controls for private instances, disable or restrict the documentation-upload facility (trade-off: maintainers lose hosted Haddock docs) and block browser rendering of package-supplied .html/.js by overriding the served content type (trade-off: legitimate in-tarball HTML no longer renders inline). Advisory/reference URLs: https://osv.dev/vulnerability/HSEC-2024-0004, https://nvd.nist.gov/vuln/detail/CVE-2026-40470, https://vuldb.com/vuln/359152.
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-25233
GHSA-hxp4-rf8g-9mwq