Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-40458
Published:April 17, 2026
Updated:May 18, 2026
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
Affected Packages
https://github.com/pac4j/pac4j.git (GITHUB):
Affected version(s) >=pac4j-parent-6.0.0-RC1 <pac4j-parent-6.4.1
Fix Suggestion:
Update to version pac4j-parent-6.4.1
https://github.com/pac4j/pac4j.git (GITHUB):
Affected version(s) >=pac4j-parent-5.2.0 <pac4j-parent-5.7.10
Fix Suggestion:
Update to version pac4j-parent-5.7.10
org.pac4j:pac4j-core (JAVA):
Affected version(s) >=1.4.0 <5.7.10
Fix Suggestion:
Update to version 5.7.10
org.pac4j:pac4j-core (JAVA):
Affected version(s) >=6.0.0-RC1 <6.4.1
Fix Suggestion:
Update to version 6.4.1
Do you need more information?
Contact Us
CVSS v4
Base Score:
7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
ACTIVE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
HIGH
Vulnerable System Availability
LOW
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.1
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
LOW
Weakness Type (CWE)
Cross-Site Request Forgery (CSRF)
EPSS
Base Score:
0.02