Skip to main content

hackage-server CVE-2026-40471

| EUVDEUVD-2026-25234 CRITICAL
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-04-23 redhat-cnalr GHSA-mf84-vmqg-86fm
9.6
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Lure victim to malicious page
  2. Delivery
    Auto-submit forged cross-site request
  3. Exploit
    Browser attaches victim's session
  4. Execution
    Server performs action (upload/admin/create account)
  5. Impact
    Attacker-controlled package or account persists

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

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 victim to visit an attacker-controlled or attacker-influenced web page while their browser holds a valid hackage-server session (latent credentials), reflecting the CVSS UI:R requirement - the attacker cannot act without a human trigger. For privileged actions (package upload, administrative changes), the victim must be an authenticated maintainer/admin; the unauthenticated subset (e.g., creating new user accounts) needs only any visitor. The limiting factors are: mandatory user interaction, dependence on an active authenticated session for high-impact actions, and the fact that CSRF cannot be automated or read back responses cross-origin. This is not a no-conditions unauthenticated RCE - it is a cross-origin request-forgery affecting any reachable hackage-server endpoint lacking CSRF protection.

Impact

The signals conflict and must be read together. The NVD CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L, score 9.6 Critical) reflects the worst case: remote, low-complexity, no attacker privileges, but requiring victim interaction, with a scope change into the authenticated application context. Against that, EPSS is only 0.02% (4th percentile) and CISA SSVC records Exploitation: none and Automatable: no - CSRF inherently needs a human victim to visit an attacker-controlled page, so it cannot be mass-automated, which tempers real-world urgency. SSVC Technical Impact: total agrees with the high CVSS impact metrics. One point of tension: classic CSRF lets an attacker trigger actions but not read cross-origin responses, so the NVD C:H (full confidentiality loss) is questionable for a pure CSRF and may be optimistic - the primary loss is integrity (unauthorized uploads/admin actions). Net: a genuinely high-severity design flaw in the affected server, but not a drop-everything mass-exploitation event; prioritize based on whether you run an exposed hackage-server instance and have privileged users active in the same browser.

Exploit ScenarioDerived

An attacker publishes a web page containing hidden auto-submitting forms or fetch calls targeting a hackage-server instance and lures a logged-in maintainer or admin to visit it (e.g., via a link in an email or forum post). The victim's browser silently submits the requests with its existing session, causing an attacker-controlled package to be uploaded or an administrative change to be made; unauthenticated endpoints such as account creation can be driven even without a logged-in victim. No public exploit code is identified at time of analysis, but the low attack complexity makes a working PoC trivial to construct.

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

Cross-Site Request Forgery in hackage-server (the Haskell Hackage package repository server) allows a malicious web page to force a victim's authenticated browser to issue state-changing requests, letting attackers upload packages or perform administrative actions using the victim's latent session, and to abuse unauthenticated flows such as creating new user accounts. The flaw stems from a site-wide absence of CSRF tokens across endpoints. There is no public exploit identified at time of analysis, and EPSS exploitation probability is very low (0.02%, 4th percentile), but technical impact is rated total.

RemediationAI

Upgrade to a fixed hackage-server release as identified in the Haskell Security Advisory HSEC-2026-0002 (https://osv.dev/vulnerability/HSEC-2026-0002); an exact patched version was not provided in the input data and should be confirmed against that advisory before deployment, so treat the fix as 'per vendor advisory' rather than a specific tagged version. Until patched, operators of self-hosted instances can reduce exposure by fronting the server with a reverse proxy that enforces Origin/Referer checks on state-changing (POST/PUT/DELETE) requests, setting session cookies to SameSite=Strict or SameSite=Lax to blunt cross-site cookie attachment (trade-off: may affect legitimate cross-site links into authenticated flows), and restricting administrative and upload endpoints to trusted networks or VPN (trade-off: reduces convenience for remote maintainers). Advise privileged users to log out or use a separate browser profile for administration to avoid latent-credential abuse. Consult the VulDB (https://vuldb.com/vuln/359155) and NVD (https://nvd.nist.gov/vuln/detail/CVE-2026-40471) references for updates.

Affected ProductsAI

The affected product is hackage-server, the Haskell package repository server software (the codebase behind hackage.haskell.org and self-hosted mirrors). The input data does not include CPE strings or an enumerated fixed/affected version range, so precise version boundaries are not confirmed from the provided sources; authoritative version detail is expected in the Haskell Security Advisory HSEC-2026-0002 (https://osv.dev/vulnerability/HSEC-2026-0002). Additional references: VulDB advisory (https://vuldb.com/vuln/359155) and the NVD entry (https://nvd.nist.gov/vuln/detail/CVE-2026-40471), tracked in the EU database as EUVD-2026-25234.

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 Haskell application that powers Hackage (hackage.haskell.org), the central repository for Haskell packages, and is also self-hosted for private/mirror deployments. The root cause is CWE-352 (Cross-Site Request Forgery): the application authorizes state-changing HTTP requests based solely on the ambient browser session (cookies) without verifying a per-request anti-CSRF token or validating the request origin. Because the check is missing uniformly across endpoints rather than on a single form, both authenticated administrative actions (e.g., package upload) and unauthenticated actions (e.g., account creation) can be driven cross-origin. No specific library CPE was supplied in the input, so exact affected version boundaries are not enumerated in NVD data provided 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.6 CRITICAL
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L
vuln.today AI 8.8 HIGH

Remote low-complexity CSRF needing victim interaction (UI:R) and no attacker auth (PR:N); scope change into app context; integrity high (forged uploads/admin), but confidentiality only low since CSRF cannot read cross-origin responses.

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

Primary rating from NVD.

CVSS VectorNVD

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

DescriptionCVE.org

hackage-server lacked Cross-Site Request Forgery (CSRF) protection across its endpoints. Scripts on foreign sites could trigger requests to hackage server, possibly abusing latent credentials to upload packages or perform other administrative actions. Some unauthenticated actions could also be abused (e.g. creating new user accounts).

Executive ViewAI

Why It Matters

The Haskell package repository (Hackage) contains a critical CSRF vulnerability that could allow attackers to inject malicious packages into the central distribution system, creating supply chain risk for organizations using Haskell. No public exploit identified at time of analysis, but the vulnerability's position in critical infrastructure warrants immediate hardening and monitoring to prevent supply chain compromise.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: enforce SameSite=Strict on session cookies, implement WAF rules to detect and block CSRF attack patterns, require additional authentication verification (password prompt) before sensitive operations, restrict cross-origin access to Hackage API endpoints, and establish continuous monitoring of account logins and package upload events for anomalies. Consider establishing a controlled package mirror with cryptographic verification to reduce direct dependency on the vulnerable upstream repository.

Threat Intelligence Overview

EPSS Score
0.0%
Top 96% exploitable
Prevalence
Low
niche Haskell ecosystem server; few self-hosted instances 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
Very High
Technical Impact
Total

Priority Score

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

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

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