Vulnerabilities in pkg:maven/io.jsonwebtoken/jjwt-impl
PACKAGECVE-2024-31033 is a MODERATE (CVSS 6.8) jjwt improperly generates signing keys vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Withdrawn libraries in the Maven ecosystem. The issue involves jjwt improperly generates signing keys. Remediation is available in the latest vendor maintenance releases.
pkg:maven/io.jsonwebtoken/jjwt-impl
Vulnerability advisories affecting package pkg:maven/io.jsonwebtoken/jjwt-impl. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-r65j-6h5f-4f92 | CVE-2024-31033 | MODERATE | Withdrawn: JJWT improperly generates signing keys |
CVE-2024-31033 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2024-31033
To remediate this vulnerability, upgrade all affected Withdrawn 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>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.jsonwebtoken
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-31033, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.jsonwebtoken
Analyze the terminal output to locate any version of Withdrawn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.jsonwebtoken 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Withdrawn, 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-2024-31033 Affected Withdrawn Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.jsonwebtoken:jjwt-impl
|
Maven |
≤ 0.12.5
|
|
References
Frequently Asked Questions
What is CVE-2024-31033?
Which Withdrawn versions are affected?
What version fixes CVE-2024-31033?
Is jjwt-impl affected?
What is the CVSS score of CVE-2024-31033?
What CWE is associated with CVE-2024-31033?
How can I check Maven dependencies for CVE-2024-31033?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r65j-6h5f-4f92",
"modified" : "2024-04-03T14:52:58Z",
"published" : "2024-04-01T03:30:38Z",
"withdrawn" : "2024-04-03T14:52:58Z",
"aliases" : [ "CVE-2024-31033" ],
"summary" : "Withdrawn: JJWT improperly generates signing keys",
"details" : "## Withdrawn Advisory\n\nThis advisory has been withdrawn because it has been found to be disputed. Please see the issue [here](https://github.com/jwtk/jjwt/issues/930#issuecomment-2032699358) for more information.\n\n## Original Description\n\nJJWT (aka Java JWT) through 0.12.5 ignores certain characters and thus a user might falsely conclude that they have a strong key. The impacted code is the setSigningKey() method within the DefaultJwtParser class and the signWith() method within the DefaultJwtBuilder class.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.jsonwebtoken:jjwt-impl"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.12.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-31033"
}, {
"type" : "WEB",
"url" : "https://github.com/jwtk/jjwt/issues/930#issuecomment-2032699358"
}, {
"type" : "WEB",
"url" : "https://github.com/2308652512/JJWT_BUG"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jwtk/jjwt"
}, {
"type" : "WEB",
"url" : "https://github.com/jwtk/jjwt/blob/26948610fbef81eba867cbaad54b516d1874c70a/impl/src/main/java/io/jsonwebtoken/impl/DefaultJwtParserBuilder.java#L242"
}, {
"type" : "WEB",
"url" : "https://www.viralpatel.net/java-create-validate-jwt-token"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-327" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-01T16:28:49Z",
"nvd_published_at" : "2024-04-01T02:15:07Z"
}
}