CVE-2026-40458
HIGH 7.0CVSS 4.0PAC4J has a Cross-Site Request Forgery (CSRF) Vulnerability
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
- Published
- 17 Apr 2026
- Last modified
- 10 Sep 2026
- Assigned by
- cvd@cert.pl
- NVD status
- Analyzed
- Weakness
- CWE-352
- Also known as
- GHSA-xw5c-jc7x-gf75
- Sources
- NVDJSONOSV GHSA-xw5c-jc7x-gf75JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | cvd@cert.pl (Secondary) | CVSS 4.0 | HIGH 7.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pac4j | pac4jcpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:* |
>= 5.0.0, < 5.7.10 | 5.7.10 |
| NVD | pac4j | pac4jcpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:* |
> 6.0.0, < 6.4.1 | 6.4.1 |
| OSV | Maven | org.pac4j:pac4j-core | < 5.7.10 | 5.7.10 |
| OSV | Maven | org.pac4j:pac4j-core | >= 6.0.0-RC1, < 6.4.1 | 6.4.1 |
References
- https://cert.pl/en/posts/2026/04/CVE-2026-40458/ · Third Party Advisory, WEB
- https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-40458 · ADVISORY
- https://github.com/pac4j/pac4j · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 17 Apr 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Apr 2026)