CVE-2021-44878
Pac4j token validation bypass if OpenID Connect provider supports none algorithm
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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.pac4j » pac4j-oidc | < 4.5.5>= 5.0, < 5.3.1 | 4.5.5, 5.3.1 |
Blast radius
21% of the dependent artifacts (160) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 5,945 |
| 2 hops | 17,234 |
| 3 hops | 12,752 |
| 4 hops | 4,826 |
| 5 hops | 997 |
| 6 hops | 311 |
Most used dependents
- org.apereo.cas » cas-server-core-util-api492 usages
- org.apereo.cas » cas-server-core-configuration-api442 usages
- org.apereo.cas » cas-server-core-authentication-api400 usages
- org.apereo.cas » cas-server-core-util296 usages
- org.apereo.cas » cas-server-core-web-api288 usages
- org.apereo.cas » cas-server-core-services280 usages
- org.apereo.cas » cas-server-core-configuration264 usages
- org.apereo.cas » cas-server-core-services-api243 usages
- org.apereo.cas » cas-server-core-authentication232 usages
- org.apereo.cas » cas-server-core-web212 usages
- org.apereo.cas » cas-server-core-tickets182 usages
- org.apereo.cas » cas-server-core-services-authentication155 usages
- org.apereo.cas » cas-server-core-webflow153 usages
- org.apereo.cas » cas-server-core-webflow-api150 usages
- org.apereo.cas » cas-server-core135 usages
Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2021-44878 | nvd.nist.gov |
| Package | pac4j/pac4j | github.com |
| Web | pac4j/pac4j commit 09684e0 | github.com |
| Web | pac4j/pac4j commit 22b82ff | github.com |
| Web | pac4j/pac4j commit 9c87bbc | github.com |
| Web | specs/openid-connect-core-1_0.html | openid.net |
| Web | 4.5.x/docs/release-notes.html | pac4j.org |
| Web | blog/cve_2021_44878_is_this_serious.html | pac4j.org |
