CVE-2026-40458 in Pac4J
PAC4J is vulnerable to Cross-Site Request Forgery (CSRF). A malicious attacker can craft a specially designed website which, when visited by a user, will automatically submit a forged cross-site request with a token whose hash collides with the victim's legitimate CSRF token. Importantly, the attacker does not need ...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, requires user interaction, impact contained to the vulnerable component, no confidentiality impact, full integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Pac4J | Pac4J | ≥ 6.0, < 6.4.1 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
PAC4J is vulnerable to Cross-Site Request Forgery (CSRF). A malicious attacker can craft a specially designed website which, when visited by a user, will automatically submit a forged cross-site request with a token whose hash collides with the victim's legitimate CSRF token. Importantly, the attacker does not need to know the victim’s CSRF token or its hash prior to the attack. Collisions in the deterministic String.hashCode() function can be computed directly, reducing the effective token's security space to 32 bits. This bypasses CSRF protection, allowing profile updates, password changes, account linking, and any other state-changing operations to be performed without the victim's consent. This issue was fixed in PAC4J versions 5.7.10 and 6.4.1
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-40458 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-256268-M |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| Published | 2026-04-17 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-352: Cross-Site Request Forgery (CSRF)
Web application does not verify that a request was intentionally sent by the authenticated user.
Related attack patterns (CAPEC)
CAPEC-462 Cross-Domain Search Timing via CWE-352
CAPEC-467 Cross Site Identification via CWE-352
CAPEC-62 Cross Site Request Forgery via CWE-352
CAPEC-111 JSON Hijacking (aka JavaScript Hijacking) via CWE-352
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
PAC4J is vulnerable to Cross-Site Request Forgery (CSRF) due to potential hash collisions in CSRF tokens, allowing attackers to submit forged requests without knowing the victim's token.
A malicious attacker can create a website that, when visited by a user, automatically submits a forged request with a token whose hash collides with the victim's legitimate CSRF token. The attacker does not need prior knowledge of the victim's CSRF token or its hash.
Questions
What is CVE-2026-40458?
PAC4J is vulnerable to Cross-Site Request Forgery (CSRF) due to potential hash collisions in CSRF tokens, allowing attackers to submit forged requests without knowing the victim's token.
What is the CVSS score for CVE-2026-40458?
CVE-2026-40458 has CVSS 6.5 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N. EPSS: 0.2%.
Is CVE-2026-40458 actively exploited?
No confirmed active exploitation of CVE-2026-40458 as of 2026-09-25.
How do I remediate CVE-2026-40458?
Priority: MEDIUM. Advisory: https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html
What systems are affected by CVE-2026-40458?
CVE-2026-40458 affects Pac4J Pac4J.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Pac4J","product":"Pac4J","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.