Issuer field partial matches allowed in pyjwt
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 are still present so real world impact is likely limited to denial of service scenarios. This issue has been patched in version 2.10.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-53861
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:31 UTC · Revision 1
Source evidence
Issuer field partial matches allowed in pyjwt
core-osv · Original sourcePublished 29 Nov 2024, 18:43 UTC
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 are still present so real world impact is likely limited to denial of service scenarios. This issue has been patched in version 2.10.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.
osv:CVE-2024-53861
Complete source record
{
"id": "b6b2d113a41044a522923a7130fadbd66d9af8154b7124c2aacf0eac55290bff",
"url": "https://osv.dev/vulnerability/CVE-2024-53861",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Issuer field partial matches allowed in pyjwt",
"summary": "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 are still present so real world impact is likely limited to denial of service scenarios. This issue has been patched in version 2.10.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.",
"evidence": "osv:CVE-2024-53861",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2024-53861",
"aliases": [
"CVE-2024-53861",
"GHSA-75c5-xw7c-p5pm",
"PYSEC-2026-1814"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/jpadilla/pyjwt",
"type": "GIT",
"events": [
{
"introduced": "783f324e5d2155462515ced45718fc164dd04db2"
},
{
"fixed": "1570e708672aa9036bc772476beae8bfa48f4131"
},
{
"fixed": "33022c25525c1020869c71ce2a4109e44ae4ced1"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "= 2.10.0"
},
{
"last_affected": "= 2.10.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandaloneSingleVersion"
},
{
"range": [
{
"fixed": "1570e708672aa9036bc772476beae8bfa48f4131"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "33022c25525c1020869c71ce2a4109e44ae4ced1"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"2.10.0",
"= 2.10.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-53861.json"
}
}
],
"modified": "2026-10-28T02:30:37.235263460Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53861.json",
"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-75c5-xw7c-p5pm",
"https://nvd.nist.gov/vuln/detail/CVE-2024-53861",
"https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366",
"https://github.com/jpadilla/pyjwt/commit/33022c25525c1020869c71ce2a4109e44ae4ced1"
],
"provider_metadata": {
"cwe_ids": [
"CWE-697"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53861.json"
}
},
"related_cves": [
{
"value": "CVE-2024-53861",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504705,
"published_at": "2024-11-29T18:43:07.644+00:00"
}