# CVE-2026-40458: Cross-Site Request Forgery in PAC4J

- Severity: High 7.0 (CVSS:4.0, scored by CERT-PL) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-02)
- Published: 2026-04-17T13:18:26.308Z
- Modified: 2026-09-10T03:50:45.063Z
- Also known as: GHSA-xw5c-jc7x-gf75
- Weaknesses: CWE-352
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CERT-PL

## Description

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

(As written by CVE List.)

## Affected

- PAC4J PAC4J: from 5.0 before 5.7.10; from 6.0 before 6.4.1; from 5.0.0 before 5.7.10; from >6.0.0 before 6.4.1
- org.pac4j:pac4j-core (Maven): before 5.7.10; from 6.0.0-RC1 before 6.4.1

## Every score

- CERT-PL: CVSS:4.0 7.0 High `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`
- GitHub: CVSS:3.1 6.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- GitHub: CVSS:4.0 High `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: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`

## References

- <https://cert.pl/en/posts/2026/04/CVE-2026-40458/> (third-party-advisory)
- <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://cert.pl/en/posts/2026/04/CVE-2026-40458> (web)
- <https://github.com/pac4j/pac4j> (package)

## Sources

- CVE List: [CVE-2026-40458](https://www.cve.org/CVERecord?id=CVE-2026-40458), CVE Terms of Use, modified 2026-04-17
- GitHub Advisory Database: [GHSA-xw5c-jc7x-gf75](https://github.com/advisories/GHSA-xw5c-jc7x-gf75), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-40458](https://nvd.nist.gov/vuln/detail/CVE-2026-40458), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-40458 · Whole record: https://cve.day/CVE-2026-40458.json · Rebuilt by cve.day 2026-11-25T22:59:18.945Z
