CSRF in Pac4j
CVE-2026-40458
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
Vulnerability class: CSRF (Cross-Site Request Forgery)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.5 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
EPSS exploit prediction
EPSS: 0.002 (7.1th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 7th percentile — 7.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.002 · newest: 0.002 · change: +0.000
Affected products
- Pac4j — versions 5.0, 6.0
Weakness classification (CWE)
References
- cert.pl/en/posts/2026/04/CVE-2026-40458/ (Third Party Advisory, third-party-advisory)
- www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html (vendor-advisory, Vendor Advisory)
Frequently asked questions
- What is CVE-2026-40458?
- CVE-2026-40458 is a medium-severity vulnerability in Pac4j, classified under Cross-Site Request Forgery (CSRF). CVSS score: 6.5/10. Published 2026-04-17.
- How severe is CVE-2026-40458?
- Medium severity. CVSS v3 base score is 6.5 out of 10.