CVE-2026-40458Cross-Site Request Forgery 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 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
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | org.pac4j:pac4j-core | Fixed | 6.4.1 | GHSA-xw5c-jc7x-gf75 |
What the vendor says
As published in the CVE record by CERT-PL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- PAC4J: affected: 5.0 to before 5.7.10, 6.0 to before 6.4.1; fixed in
5.7.10,6.4.1
Vendor advisories:
- https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html (vendor-advisory)
References
- https://cert.pl/en/posts/2026/04/CVE-2026-40458/
- https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.