Skip to main content

hackage-server EUVDEUVD-2026-25233

| CVE-2026-40470 CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-04-23 redhat-cnalr GHSA-hxp4-rf8g-9mwq
9.9
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Register maintainer account
  2. Delivery
    Upload package with malicious HTML/JS
  3. Exploit
    Payload served from hackage.haskell.org origin
  4. Execution
    Authenticated victim browses the page
  5. Persist
    Script hijacks victim's session
  6. Impact
    Add maintainer or upload trojanized package

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

Exploitation requires the attacker to hold a valid Hackage account with permission to upload a source package or use the documentation upload facility (PR:L / authenticated maintainer) and to embed HTML or JavaScript in that upload, which is then served as-is on the main hackage.haskell.org domain. The attack only succeeds when a victim who has latent/active HTTP credentials for hackage.haskell.org browses to the attacker-controlled package or documentation page - so it is limited by the need for an authenticated victim to visit the malicious content (effectively user interaction) and by the payload being served from the vulnerable same-origin configuration. The impact is bounded by whatever actions the victim is authorized to perform (higher for admins/maintainers).

Impact

The signals here are notably split. CVSS 3.1 rates this 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L) driven by the scope change and high confidentiality/integrity impact, and SSVC marks Technical Impact as 'total' - consistent with full account/session takeover. However, SSVC also records Exploitation: none and Automatable: no, and EPSS is only 0.05% (14th percentile), indicating this is not a mass-scannable, worm-style flaw. Exploitation is not automatable because it requires an attacker to hold a maintainer account, plant a payload, and then wait for a specifically-authenticated victim to browse the malicious page - a targeted, social-graph-dependent path rather than opportunistic mass exploitation. Note also a tension in the CVSS vector: it uses UI:N, yet the description explicitly requires a victim to browse to the malicious page, which is genuinely user interaction - I would score this UI:R. Bottom line: high impact if triggered, but realistic likelihood is targeted and low-volume; this is a serious flaw for the Hackage service operator to patch centrally, less of a fleet-wide emergency for typical enterprises.

Exploit ScenarioDerived

A malicious maintainer registers a Hackage account and uploads a package (or documentation bundle) containing a crafted HTML/JS payload, which hackage.haskell.org serves unsanitized from its own origin. When a signed-in maintainer or admin browses that package or documentation page, the script executes in their session and silently issues authenticated requests - e.g., adding the attacker as a co-maintainer or uploading a trojanized package. No public exploit code is identified at time of analysis, and exploitation requires the victim to visit the attacker's page (AC:L but dependent on victim browsing).

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

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.

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.

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.

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

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.

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

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

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

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/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

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

Executive ViewAI

Why It Matters

CVE-2026-40470 affects hackage-server, the central package repository for the Haskell ecosystem, enabling authenticated package maintainers to inject malicious code that compromises any other authenticated user visiting affected packages. An attacker with low-privilege repository access could hijack sessions and perform unauthorized package uploads or metadata modifications, directly threatening the integrity of the Haskell supply chain. Although no public exploit has been identified and exploitation probability remains low (0.0% EPSS), the CVSS 9.9 rating reflects critical impact on a foundational ecosystem component.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) enforce Content Security Policy headers (default-src 'self', script-src 'self') to restrict inline script execution; (2) implement strict input sanitization and HTML escaping in any local package repository mirrors; (3) require multi-factor authentication for all accounts with package upload permissions; (4) enable detailed audit logging of package uploads, metadata changes, and authenticated user sessions; (5) establish a package verification process using cryptographic checksums and pgp signature validation independent of hackage.haskell.org HTML rendering; (6) restrict package resolver access to known-safe versions via lockfiles and dependency pinning.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Prevalence
Low
niche Haskell package-repository software; central site plus few private instances
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

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