Skip to main content

hackage-server EUVDEUVD-2026-25235

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

Attack ChainAIDerived

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

  1. Access
    Register package-uploader account
  2. Delivery
    Publish package with malicious .cabal URL metadata
  3. Exploit
    Payload stored in href attribute
  4. Execution
    Victim maintainer/admin views package page
  5. Persist
    Injected script executes in their session
  6. Impact
    Hijack 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.

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

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

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.0%
Top 86% exploitable
Prevalence
Low
Haskell registry software; few production deployments beyond central Hackage
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
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