Improper Verification of Cryptographic Signature Affecting io.jsonwebtoken:jjwt-impl package, versions [,0.10.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.14% (36th 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 IDSNYK-JAVA-IOJSONWEBTOKEN-6514861
  • published1 Apr 2024
  • disclosed1 Apr 2024
  • creditJiaWei Huang

Introduced: 1 Apr 2024

CVE-2024-31033  (opens in a new tab)
CWE-347  (opens in a new tab)

How to fix?

Upgrade io.jsonwebtoken:jjwt-impl to version 0.10.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature due to the setSigningKey method within the DefaultJwtParser class and the signWith method within the DefaultJwtBuilder class. A user can falsely conclude that their key is strong while in reality it is weak due to DatatypeConverter.parseBase64Binary() method removing certain special characters. An attacker could easier crack a user's key that is considered strong by using brute force.

CVSS Base Scores

version 3.1