7.0
HIGH CVSS 4.0
CVE-2026-40458
Cross-Site Request Forgery in PAC4J
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

INFO

Published Date :

April 17, 2026, 2:16 p.m.

Last Modified :

April 17, 2026, 3:38 p.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2026-40458 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 4.0 HIGH 4bb8329e-dd38-46c1-aafb-9bf32bcb93c6
CVSS 4.0 HIGH [email protected]
Solution
Update PAC4J to a version with fixed CSRF protection to prevent unauthorized actions.
  • Update PAC4J to version 5.7.10 or later.
  • Update PAC4J to version 6.4.1 or later.
  • Implement secure CSRF token generation.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-40458.

URL Resource
https://cert.pl/en/posts/2026/04/CVE-2026-40458/
https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-40458 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-40458 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-40458 vulnerability anywhere in the article.

  • cert.pl
Vulnerabilities in PAC4J software

Vulnerabilities in PAC4J software CVE ID CVE-2026-40458 Publication date 17 April 2026 Vendor PAC4J Product PAC4J Vulnerable versions From 5.0 to 5.7.10 From 6.0 to 6.4.1 Vulnerability type (CWE) Cros ... Read more

Published Date: Apr 17, 2026 (2 hours ago)

The following table lists the changes that have been made to the CVE-2026-40458 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by [email protected]

    Apr. 17, 2026

    Action Type Old Value New Value
    Added 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
    Added CVSS V4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-352
    Added Reference https://cert.pl/en/posts/2026/04/CVE-2026-40458/
    Added Reference https://www.pac4j.org/blog/security-advisory-pac4j-core-and-ldap.html
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.