Lucene search

K
veracodeVeracode Vulnerability DatabaseVERACODE:44332
HistoryNov 21, 2023 - 7:14 a.m.

JSON Web Token (JWT) Algorithm Confusion

2023-11-2107:14:41
Veracode Vulnerability Database
sca.analysiscenter.veracode.com
22
json web token
algorithm confusion
vulnerability
fast-jwt
publickeypemmatcher
crypto.js
rsa public key
rs256 algorithm

5.9 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

7 High

AI Score

Confidence

Low

0.001 Low

EPSS

Percentile

20.5%

fast-jwt is vulnerable to JWT Algorithm Confusion. The vulnerability is caused by a missing validation on publicKeyPemMatcher constant defined in fast-jwt/src/crypto.js which is used to match all common PEM formats for public keys. An attacker can craft a malicious JWT token utilizing the HS256 algorithm, signed with the public RSA key of the victim application. This attack works only if the victim application utilizes a public key containing the BEGIN RSA PUBLIC KEY header and uses the RS256 algorithm with the JWT verify function called without explicitly providing an algorithm.

CPENameOperatorVersion
fast-jwtle3.3.1
fast-jwtle3.3.1

5.9 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

7 High

AI Score

Confidence

Low

0.001 Low

EPSS

Percentile

20.5%

Related for VERACODE:44332