Skip to main content

hackage-server CVE-2026-40472

| EUVDEUVD-2026-25235 CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-04-23 redhat-cnalr GHSA-8fw8-47cx-j4q4
9.9
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L
vuln.today AI
5.4 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

Lifecycle Timeline

3
Analysis Generated
Jul 24, 2026 - 04:43 vuln.today
EUVD ID Assigned
Apr 23, 2026 - 16:00 euvd
EUVD-2026-25235
CVE Published
Apr 23, 2026 - 15:00 nvd
CRITICAL 9.9

DescriptionCVE.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.

Share

CVE-2026-40472 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy