Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister package-uploader account
-
DeliveryPublish package with malicious .cabal URL metadata
-
ExploitPayload stored in href attribute
-
ExecutionVictim maintainer/admin views package page
-
PersistInjected script executes in their session
-
ImpactHijack session or act as victim
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must hold a valid package-publishing account on the target hackage-server instance (CVSS PR:L, authenticated) and be able to upload or edit a package whose .cabal metadata fields (such as homepage, bug-reports, or source-repository URLs) are rendered into href attributes. Successful script execution against a victim requires that victim to view - and for a javascript: href, click - the malicious package page, so despite the official UI:N the practical trigger involves victim interaction. Limiting factors: exploitation is confined to registry instances that render unsanitized .cabal URL metadata, requires an authenticated uploader rather than an anonymous attacker, and yields impact only when a logged-in user (ideally a privileged maintainer/admin) opens the poisoned page. |
| Impact | The signals conflict and must be weighed carefully. The published CVSS 3.1 base score is 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L), unusually high for a stored XSS and driven by a scope change plus High confidentiality/integrity impact. However EPSS is only 0.05% (14th percentile), SSVC records Exploitation: none and Automatable: no, and no POC or KEV listing is present - indicating no evidence of real-world or automated exploitation. The UI:N in the official vector is questionable for stored XSS delivered via an href attribute, since triggering a javascript: link typically requires a victim to click or view the page (user interaction); this discrepancy should be verified with the vendor. Net assessment: a genuine, serious application-security flaw on a high-value shared registry, but current real-world exploitation risk is low-to-moderate and targeted rather than mass-automated, so it is a should-patch rather than a drop-everything emergency for private deployments. |
| Exploit ScenarioDerived | An attacker registers a Hackage account, then uploads or revises a package whose .cabal homepage or source-repository field contains a javascript: URI or an attribute-breaking XSS payload. When a maintainer or administrator later browses that package page and follows or renders the poisoned link, the injected script runs in their authenticated session, enabling session/cookie theft or actions on their behalf. No public POC has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
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.
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.
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.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
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.
Executive ViewAI
Hackage-server (the central Haskell package registry) contains a stored cross-site scripting vulnerability in package metadata handling that allows authenticated package uploaders to inject malicious JavaScript. Any maintainer, administrator, or user viewing an affected package page could execute attacker-controlled code in their browser session, potentially compromising credentials or session tokens. This threatens the integrity of the Haskell package ecosystem and administrative access.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict package upload permissions to verified maintainers only; (2) Implement output HTML entity encoding for all .cabal metadata rendered in href attributes and other HTML contexts; (3) Deploy Content Security Policy headers prohibiting inline script execution; (4) Enable browser security features via X-Frame-Options and X-Content-Type-Options headers; (5) Monitor for suspicious metadata patterns and educate maintainers/administrators to exercise caution with untrusted package links.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-25235
GHSA-8fw8-47cx-j4q4
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB