Vulnerability

CVE-2026-40458

highCVSS 4.0 7.0Published 17 Apr 2026

A plain-language summary of this CVE is being written; the description below is the NVD's own text.

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

Affected products

From the NVD's configuration data (CPE), vendor first.

  • Pac4j pac4j

Weakness type

References

  • cert.pl /en/posts/2026/04/CVE-2026-40458/
  • www.pac4j.org /blog/security-advisory-pac4j-core-and-ldap.html

Ingati scans your site every week and tells you when a CVE like this one affects something it found there.

Start scanning