Cross-site Request Forgery (CSRF) Affecting org.pac4j:pac4j-core package, versions [5.0.0-RC1,5.7.10)[6.0.0-RC1,6.4.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.01% (1st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGPAC4J-16109661
  • published19 Apr 2026
  • disclosed17 Apr 2026
  • creditBartłomiej Dmitruk

Introduced: 17 Apr 2026

CVE-2026-40458  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade org.pac4j:pac4j-core to version 5.7.10, 6.4.1 or higher.

Overview

org.pac4j:pac4j-core is a pac4j is an easy and powerful security engine for Java to authenticate users, get their profiles and manage authorizations in order to secure web applications and web services.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to deterministic calculations in the String.hashCode() function. An attacker can perform unauthorized profile updates, password changes, account linking, and other state-changing actions by submitting a forged request with a token whose hash collides with the legitimate CSRF token. The attacker does not need to possess the legitimate token or its hash before the attack.

CVSS Base Scores

version 4.0
version 3.1