{"cve":"CVE-2026-40458","nvd":{"published":"2026-04-17T14:16:33.987","modified":"2026-06-17T10:45:19.557","status":"Analyzed","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.\n\nThis issue was fixed in PAC4J versions 5.7.10 and 6.4.1","cvss_v4":{"vector":"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","score":7.0},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5},"cwes":["CWE-352"],"references":["https://cert.pl/en/posts/2026/04/CVE-2026-40458/","https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html"],"products":["pac4j:pac4j"],"source":"nvd","synced_at":"2026-10-19T22:30:49.762551342+00:00"},"epss":{"cve":"CVE-2026-40458","score":0.00165,"percentile":0.05777,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-xw5c-jc7x-gf75","url":"https://osv.dev/vulnerability/GHSA-xw5c-jc7x-gf75","summary":"PAC4J has a Cross-Site Request Forgery (CSRF) Vulnerability","modified":"2026-09-10T03:50:45.063804935Z","packages":[{"ecosystem":"Maven","name":"org.pac4j:pac4j-core","purl":"pkg:maven/org.pac4j/pac4j-core","ranges":["<5.7.10"],"fixed":["5.7.10"]},{"ecosystem":"Maven","name":"org.pac4j:pac4j-core","purl":"pkg:maven/org.pac4j/pac4j-core","ranges":[">=6.0.0-RC1 <6.4.1"],"fixed":["6.4.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}