Cross-Site Request Forgery in PAC4J
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Tampering
- Confidentiality · integrity · availability
- None · High · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-352.
Summary
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
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pac4j | PAC4J | 5.0 to before 5.7.10; 6.0 to before 6.4.1 | 5.7.10, 6.4.1 | Patch available | CNA |
| — | org.pac4j:pac4j-core (Maven) | before 5.7.10 | 5.7.10 | Patch available | GHSA-xw5c-jc7x-gf75 |
| — | org.pac4j:pac4j-core (Maven) | 6.0.0-RC1 to before 6.4.1 | 6.4.1 | Patch available | GHSA-xw5c-jc7x-gf75 |
- PAC4J Vendorpac4j Affected 5.0 to before 5.7.10; 6.0 to before 6.4.1 Fixed in 5.7.10, 6.4.1 Patch available CNA
- org.pac4j:pac4j-core (Maven) Vendor— Affected before 5.7.10 Fixed in 5.7.10 Patch available GHSA-xw5c-jc7x-gf75
- org.pac4j:pac4j-core (Maven) Vendor— Affected 6.0.0-RC1 to before 6.4.1 Fixed in 6.4.1 Patch available GHSA-xw5c-jc7x-gf75
Remediation
- Fix · CNA PAC4J (PAC4J) Fixed in 5.7.10, 6.4.1
- Fix · GHSA-xw5c-jc7x-gf75 org.pac4j:pac4j-core (Maven) Fixed in 5.7.10 Advisory →
- Fix · GHSA-xw5c-jc7x-gf75 org.pac4j:pac4j-core (Maven) Fixed in 6.4.1 Advisory →
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
PAC4J — pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html
2 records Highest priority Priority MEDIUM 1 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2026-29211 LDAP Injection in PAC4JPriority MEDIUM 41
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40458
- 2026-10-03 Alias added: GHSA-xw5c-jc7x-gf75
References
More Pac4j vulnerabilities
- TI-2026-29211 LDAP Injection in PAC4J CVSS 4.0HIGH 8.7
- TI-2021-20310 If an OpenID Connect provider supports the "none" algorithm (i.e., tokens with no… CVSS 3.1HIGH 7.5
- TI-2019-08020 The SAML identifier generated within SAML2Utils.java was found to make use of the apache… CVSS 3.1MEDIUM 4.9
Sources
- CVE-2026-40458 · CVE Program
- CVE-2026-40458 · NVD
- FIRST EPSS
- GHSA-xw5c-jc7x-gf75 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences