Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 999 Bytes

jwt-algorithm-confusion.md

File metadata and controls

25 lines (20 loc) · 999 Bytes
name severity cvss-score cvss-vector cwe-id cwe-name compliance
JWT algorithm confusion
high
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CWE-345
Insufficient Verification of Data Authenticity
HIPAA ISO 27001 owasp10 PCI v4.0
164.306(a), 164.312(c)(1)
A.8.2, A.8.3, A.8.5, A.8.24
A8
pci4-6.2.4

The server uses public/private key signatures to protect the JWTs. But it also accepts JWTs signed with HMAC. By changing the signing algorithm in your JWTs to HMAC and using the HTTPS certificate as secret we created a JWT accepted by your server. If the JWT is used to control access to the application, an attacker could take advantage of this vulnerability to forge a token and impersonate other users or even elevate privileges.

How to fix

{% tabs jwt-algorithm-confusion %} {% tab jwt-algorithm-confusion generic %} To fix this issue, you should only have public/private key algorithms in the list of allowed algorithms. {% endtab %}

{% endtabs %}