CVE-2021-44878 Pac4j token validation bypass if OpenID Connect provider supports none algorithm
Attackers can bypass OpenID Connect token validation by using the 'none' algorithm, allowing unauthorized access if the library is not explicitly configured to reject it.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-44878?
CVE-2021-44878 is a high-severity authentication bypass vulnerability in n/a, published on 6 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
If an OpenID Connect provider supports the "none" algorithm (i.e., tokens with no signature), pac4j v5.3.0 (and prior) does not refuse it without an explicit configuration on its side or for the "idtoken" response type which is not secure and violates the OpenID Core Specification. The "none" algorithm does not require any signature verification when validating the ID tokens, which allows the attacker to bypass the token validation by injecting a malformed ID token using "none" as the value of "alg" key in the header with an empty signature value.
Weakness: CWE-347
Which versions are affected by CVE-2021-44878?
4 open source packages ship an affected version, including org.pac4j:pac4j-oidc. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.pac4j:pac4j-oidc Maven | All versions | 4.5.5 |
org.pac4j:pac4j-oidc Maven | All versions | 4.5.5 |
org.pac4j:pac4j-oidc Maven | From 5.0 | 5.3.1 |
org.pac4j:pac4j-oidc Maven | From 5.0 | 5.3.1 |
Products include Pac4j Pac4j.
How do I fix CVE-2021-44878?
Upgrade org.pac4j:pac4j-oidc to a fixed version for your release line: 4.5.5 or 5.3.1.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2021-44878 being exploited?
There is no known exploitation of CVE-2021-44878 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-xhw6-hjc9-679m.