Severity by source
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L
Authenticated uploader (PR:L) plants stored XSS but a victim must view/click the href link (UI:R); browser-context execution crosses scope (S:C) with limited C/I and no availability impact.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
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.
AnalysisAI
Stored cross-site scripting in hackage-server (the Haskell Hackage package registry software) lets a low-privileged authenticated package uploader inject persistent JavaScript by placing crafted metadata in a package's .cabal file, which the server renders into HTML href attributes without sanitization (CWE-79). Because the payload persists in package pages, any user or maintainer viewing the affected package - potentially including administrators - can have script executed in their session. No public exploit has been identified at time of analysis and EPSS is very low (0.05%, 14th percentile), but SSVC rates the technical impact as total.
Technical ContextAI
hackage-server is the open-source software that powers Hackage, the central package archive for the Haskell ecosystem. Package authors submit a .cabal metadata file describing homepage, bug-tracker, source-repository and similar URL fields; hackage-server emits several of these values into anchor (href) attributes on rendered package pages. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation): the attacker-controlled .cabal strings are placed into an href context without HTML/URL-attribute encoding or scheme allow-listing, so a javascript: URI or attribute-breaking payload survives into the DOM. No CPE strings were supplied in the intelligence, so exact affected version boundaries are not machine-enumerated here.
Affected ProductsAI
The affected product is hackage-server, the software behind the Haskell Hackage package registry. No CPE strings, exact version numbers, or version ranges were provided in the supplied intelligence, so the affected-version boundaries are not confirmed here; consult the Haskell Security Advisory HSEC-2026-0004 at https://osv.dev/vulnerability/HSEC-2026-0004 and the NVD record at https://nvd.nist.gov/vuln/detail/CVE-2026-40472 (also tracked as EUVD-2026-25235 and VulDB 359158 at https://vuldb.com/vuln/359158) for the precise fixed and vulnerable revisions.
RemediationAI
Upgrade hackage-server to the fixed revision identified in Haskell Security Advisory HSEC-2026-0004 (https://osv.dev/vulnerability/HSEC-2026-0004); no exact fix version was included in the supplied data, so the released patched version is not independently confirmed here - verify against that advisory and the project's Git history before deploying. If an immediate upgrade is not possible, compensating controls include stripping or allow-listing URL schemes on rendered .cabal fields (permit only http/https/mailto and reject javascript:/data:), applying output encoding to href attributes at the template layer, and deploying a restrictive Content-Security-Policy (e.g. script-src 'self' with no inline execution) which blocks injected inline scripts at the cost of breaking any legitimate inline scripting on package pages. Operators can also gate or manually review new package uploads and metadata edits, which reduces exposure but slows publishing throughput.
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-25235
GHSA-8fw8-47cx-j4q4