Vulnerabilities in pkg:maven/org.pac4j/pac4j-oidc
PACKAGECVE-2021-44878 is a HIGH (CVSS 7.5) pac4j token validation bypass if vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Pac4j oidc libraries in the Maven ecosystem. The issue involves pac4j token validation bypass if openid connect provider supports none algorithm. Remediation is available by upgrading affected packages to version 4.5.5, 5.3.1.
pkg:maven/org.pac4j/pac4j-oidc
Vulnerability advisories affecting package pkg:maven/org.pac4j/pac4j-oidc. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-xhw6-hjc9-679m | CVE-2021-44878 | HIGH | Pac4j token validation bypass if OpenID Connect provider supports none algorithm |
CVE-2021-44878 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2021-44878
To remediate this vulnerability, upgrade all affected Pac4j oidc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oidc</artifactId>
<version>4.5.5</version>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oidc</artifactId>
<version>5.3.1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.pac4j
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-44878, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.pac4j
Analyze the terminal output to locate any version of Pac4j oidc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.pac4j command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Pac4j oidc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-44878 Affected Pac4j oidc Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.pac4j:pac4j-oidc
|
Maven |
< 4.5.5
|
4.5.5
|
|
org.pac4j:pac4j-oidc
|
Maven |
≥ 5.0
< 5.3.1
|
5.3.1
|
References
Frequently Asked Questions
What is CVE-2021-44878?
Which Pac4j oidc versions are affected?
What version fixes CVE-2021-44878?
Is pac4j-oidc affected?
What is the CVSS score of CVE-2021-44878?
What CWE is associated with CVE-2021-44878?
How can I check Maven dependencies for CVE-2021-44878?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xhw6-hjc9-679m",
"modified" : "2023-09-26T17:27:45Z",
"published" : "2022-01-08T00:36:05Z",
"aliases" : [ "CVE-2021-44878" ],
"summary" : "Pac4j token validation bypass if OpenID Connect provider supports none algorithm",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.pac4j:pac4j-oidc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.pac4j:pac4j-oidc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0"
}, {
"fixed" : "5.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-44878"
}, {
"type" : "WEB",
"url" : "https://github.com/pac4j/pac4j/commit/09684e0de1c4753d22c53b8135d4ef61cfda76f7"
}, {
"type" : "WEB",
"url" : "https://github.com/pac4j/pac4j/commit/22b82ffd702a132d9f09da60362fc6264fc281ae"
}, {
"type" : "WEB",
"url" : "https://github.com/pac4j/pac4j/commit/9c87bbc536ed5d05f940ae015403120df2935589"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pac4j/pac4j"
}, {
"type" : "WEB",
"url" : "https://openid.net/specs/openid-connect-core-1_0.html#IDToken"
}, {
"type" : "WEB",
"url" : "https://www.pac4j.org/4.5.x/docs/release-notes.html"
}, {
"type" : "WEB",
"url" : "https://www.pac4j.org/blog/cve_2021_44878_is_this_serious.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-01-07T22:41:34Z",
"nvd_published_at" : "2022-01-06T13:15:00Z"
}
}