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
Configurations

Configuration 1 (hide)

OR cpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:*
cpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:*

History

20 Apr 2026, 14:41

Type Values Removed Values Added
First Time Pac4j
Pac4j pac4j
References () https://cert.pl/en/posts/2026/04/CVE-2026-40458/ - () https://cert.pl/en/posts/2026/04/CVE-2026-40458/ - Third Party Advisory
References () https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html - () https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html - Vendor Advisory
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 6.5
CPE cpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:*

17 Apr 2026, 14:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-04-17 14:16

Updated : 2026-04-20 14:41


NVD link : CVE-2026-40458

Mitre link : CVE-2026-40458

CVE.ORG link : CVE-2026-40458


JSON object : View

Products Affected

pac4j

  • pac4j
CWE
CWE-352

Cross-Site Request Forgery (CSRF)