CVE-2024-53861Incorrect Comparison in Project Pyjwt

Severity
7.5HIGHNVD
EPSS
1.0%
top 22.76%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedNov 29
Latest updateDec 2

Description

pyjwt is a JSON Web Token implementation in Python. An incorrect string comparison is run for `iss` checking, resulting in `"acb"` being accepted for `"_abc_"`. This is a bug introduced in version 2.10.0: checking the "iss" claim changed from `isinstance(issuer, list)` to `isinstance(issuer, Sequence)`. Since str is a Sequnce, but not a list, `in` is also used for string comparison. This results in `if "abc" not in "__abcd__":` being checked instead of `if "abc" != "__abc__":`. Signature checks

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitability: 3.9 | Impact: 3.6

Affected Packages4 packages

PyPIpyjwt_project/pyjwt2.10.02.10.1
debiandebian/pyjwt
CVEListV5jpadilla/pyjwt= 2.10.0

Patches

🔴Vulnerability Details

3
OSV
CVE-2024-53861: pyjwt is a JSON Web Token implementation in Python2024-12-02
OSV
PyJWT Issuer field partial matches allowed2024-12-02
GHSA
PyJWT Issuer field partial matches allowed2024-12-02

📋Vendor Advisories

2
Red Hat
pyjwt: Issuer field partial matches allowed in pyjwt2024-11-29
Debian
CVE-2024-53861: pyjwt - pyjwt is a JSON Web Token implementation in Python. An incorrect string comparis...2024