{"id":"CVE-2024-53861","aliases":["BELL-CVE-2024-53861","EUVD-2024-3440","GHSA-75c5-xw7c-p5pm","PYSEC-2026-1814","SUSE-SU-2026:20879-1","openSUSE-SU-2024:14540-1"],"status":"published","title":"Issuer field partial matches allowed in pyjwt","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 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.","severity":{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00825,"percentile":0.57835,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-697"],"published":"2024-11-29T18:43:07Z","modified":"2026-10-28T02:30:37Z","fixes":[{"ecosystem":"PyPI","package":"pyjwt","fixed_in":["2.10.1"],"sources":["ghsa","osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-PyJWT","fixed_in":["2.10.1-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.10.0"},{"last_affected":"2.10.0"},{"fixed":"2.10.1"}]}],"versions":["2.10.0"]},{"source":"osv","ecosystem":"PyPI","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.10.0"},{"fixed":"2.10.1"}]}],"versions":["2.10.0"]},{"source":"osv","ecosystem":"PyPI","package":"pyjwt","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.10.0"},{"fixed":"2.10.1"}]}],"versions":["2.10.0"]},{"source":"osv","ecosystem":"SUSE:Linux Micro 6.1","package":"python-PyJWT","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.1-slfo.1.1_1.1"}]}],"bundled":2},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-PyJWT","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.1-1.1"}]}]}],"products":[{"vendor":"jpadilla","product":"pyjwt"},{"vendor":"pyjwt_project","product":"pyjwt"}],"references":[{"url":"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-75c5-xw7c-p5pm","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/jpadilla/pyjwt/commit/33022c25525c1020869c71ce2a4109e44ae4ced1","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53861","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-75c5-xw7c-p5pm","tags":["advisory"]},{"url":"https://docs.bell-sw.com/security/cves/CVE-2024-53861","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53861.json","tags":["advisory"]},{"url":"https://github.com/jpadilla/pyjwt","tags":["package"]},{"url":"https://pypi.org/project/pyjwt","tags":["package"]},{"url":"https://www.suse.com/support/update/announcement/2026/suse-su-202620879-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1234038","tags":["report"]},{"url":"https://bugzilla.suse.com/1259616","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2024-53861","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-32597","tags":["web"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2024-53861","title":"Issuer field partial matches allowed in pyjwt","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 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.","status":"published","published":"2024-11-29T18:43:07.644Z","modified":"2024-12-02T18:10:35.507Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"cna"}],"cwes":["CWE-697"],"updated_at":"2026-11-02T14:34:17.523201Z"}],"euvd":[{"id":"EUVD-2024-3440","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 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.","status":"published","published":"2024-11-29T18:43:07Z","modified":"2024-12-02T18:10:35Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"updated_at":"2026-11-03T00:04:43.613884Z"}],"ghsa":[{"id":"GHSA-75c5-xw7c-p5pm","title":"PyJWT Issuer field partial matches allowed","description":"### Summary\nThe wrong string if check is run for `iss` checking, resulting in `\"acb\"` being accepted for `\"_abc_\"`.\n\n### Details\nThis is a bug introduced in version [2.10.0](https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366): checking the \"iss\" claim\nchanged from `isinstance(issuer, list)` to `isinstance(issuer,\nSequence)`.\n\n```diff\n-        if isinstance(issuer, list):\n+        if isinstance(issuer, Sequence):\n            if payload[\"iss\"] not in issuer:\n                raise InvalidIssuerError(\"Invalid issuer\")\n        else:\n```\n\nSince str is a Sequnce, but not a list, `in` is also used for string\ncomparison. This results in `if \"abc\" not in \"__abcd__\":` being\nchecked instead of `if \"abc\" != \"__abc__\":`.\n### PoC\nCheck out the unit tests added here: https://github.com/jpadilla/pyjwt-ghsa-75c5-xw7c-p5pm\n```python\n        issuer = \"urn:expected\"\n\n        payload = {\"iss\": \"urn:\"}\n\n        token = jwt.encode(payload, \"secret\")\n\n        # decode() succeeds, even though `\"urn:\" != \"urn:expected\". No exception is raised.\n        with pytest.raises(InvalidIssuerError):\n            jwt.decode(token, \"secret\", issuer=issuer, algorithms=[\"HS256\"])\n```\n\n\n### Impact\n\nI would say the real world impact is not that high, seeing as the signature still has to match. We should still fix it.\n","status":"published","published":"2024-12-02T18:34:11Z","modified":"2024-12-02T18:34:12Z","cvss":[{"version":"4.0","score":2.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low"},{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-697"],"updated_at":"2026-11-02T14:38:24.542211Z"}],"nvd":[{"id":"CVE-2024-53861","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 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.","status":"published","published":"2024-11-29T19:15:09.433Z","modified":"2026-06-17T08:09:25.893Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-697"],"updated_at":"2026-11-02T14:10:38.973941Z"}],"osv":[{"id":"BELL-CVE-2024-53861","title":"CVE-2024-53861 does not affect BellSoft software","status":"withdrawn","published":"2024-12-04T05:57:08.504062Z","modified":"2026-01-26T09:49:42.152466Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:20.963569Z"},{"id":"CVE-2024-53861","title":"Issuer field partial matches allowed in pyjwt","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 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.","status":"published","published":"2024-11-29T18:43:07.644Z","modified":"2026-10-28T02:30:37.23526346Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-697"],"updated_at":"2026-11-02T15:44:44.451316Z"},{"id":"GHSA-75c5-xw7c-p5pm","title":"PyJWT Issuer field partial matches allowed","description":"### Summary\nThe wrong string if check is run for `iss` checking, resulting in `\"acb\"` being accepted for `\"_abc_\"`.\n\n### Details\nThis is a bug introduced in version [2.10.0](https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366): checking the \"iss\" claim\nchanged from `isinstance(issuer, list)` to `isinstance(issuer,\nSequence)`.\n\n```diff\n-        if isinstance(issuer, list):\n+        if isinstance(issuer, Sequence):\n            if payload[\"iss\"] not in issuer:\n                raise InvalidIssuerError(\"Invalid issuer\")\n        else:\n```\n\nSince str is a Sequnce, but not a list, `in` is also used for string\ncomparison. This results in `if \"abc\" not in \"__abcd__\":` being\nchecked instead of `if \"abc\" != \"__abc__\":`.\n### PoC\nCheck out the unit tests added here: https://github.com/jpadilla/pyjwt-ghsa-75c5-xw7c-p5pm\n```python\n        issuer = \"urn:expected\"\n\n        payload = {\"iss\": \"urn:\"}\n\n        token = jwt.encode(payload, \"secret\")\n\n        # decode() succeeds, even though `\"urn:\" != \"urn:expected\". No exception is raised.\n        with pytest.raises(InvalidIssuerError):\n            jwt.decode(token, \"secret\", issuer=issuer, algorithms=[\"HS256\"])\n```\n\n\n### Impact\n\nI would say the real world impact is not that high, seeing as the signature still has to match. We should still fix it.\n","status":"published","published":"2024-12-02T18:34:11Z","modified":"2026-09-10T03:50:21.333090692Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low"},{"version":"4.0","score":2.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low"}],"cwes":["CWE-697"],"updated_at":"2026-11-02T15:46:40.657155Z"},{"id":"PYSEC-2026-1814","title":"PyJWT Issuer field partial matches allowed","description":"### Summary\nThe wrong string if check is run for `iss` checking, resulting in `\"acb\"` being accepted for `\"_abc_\"`.\n\n### Details\nThis is a bug introduced in version [2.10.0](https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366): checking the \"iss\" claim\nchanged from `isinstance(issuer, list)` to `isinstance(issuer,\nSequence)`.\n\n```diff\n-        if isinstance(issuer, list):\n+        if isinstance(issuer, Sequence):\n            if payload[\"iss\"] not in issuer:\n                raise InvalidIssuerError(\"Invalid issuer\")\n        else:\n```\n\nSince str is a Sequnce, but not a list, `in` is also used for string\ncomparison. This results in `if \"abc\" not in \"__abcd__\":` being\nchecked instead of `if \"abc\" != \"__abc__\":`.\n### PoC\nCheck out the unit tests added here: https://github.com/jpadilla/pyjwt-ghsa-75c5-xw7c-p5pm\n```python\n        issuer = \"urn:expected\"\n\n        payload = {\"iss\": \"urn:\"}\n\n        token = jwt.encode(payload, \"secret\")\n\n        # decode() succeeds, even though `\"urn:\" != \"urn:expected\". No exception is raised.\n        with pytest.raises(InvalidIssuerError):\n            jwt.decode(token, \"secret\", issuer=issuer, algorithms=[\"HS256\"])\n```\n\n\n### Impact\n\nI would say the real world impact is not that high, seeing as the signature still has to match. We should still fix it.\n","status":"published","published":"2026-07-07T14:34:46.000573Z","modified":"2026-07-07T17:48:03.52986255Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N","level":"low"},{"version":"4.0","score":2.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","level":"low"}],"updated_at":"2026-11-02T15:52:55.06457Z"},{"id":"openSUSE-SU-2024:14540-1","title":"python310-PyJWT-2.10.1-1.1 on GA media","description":"These are all security issues fixed in the python310-PyJWT-2.10.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-12-03T00:00:00Z","modified":"2025-05-07T18:16:24.79628Z","updated_at":"2026-11-02T16:58:36.976155Z"},{"id":"SUSE-SU-2026:20879-1","title":"Security update for python-PyJWT","description":"This update for python-PyJWT fixes the following issues:\n\nUpdate to PyJWT 2.12.1:\n\n- CVE-2024-53861: prevent partial matching of the Issuer field (bsc#1234038).\n- CVE-2026-32597: validate the crit Header Parameter defined in RFC 7515 (bsc#1259616).\n\nChangelog:\n\nUpdate to 2.12.1:\n\n - Add missing typing_extensions dependency for Python \u003c 3.11 in\n   #1150\n  \nUpdate to 2.12.0:\n\n - Annotate PyJWKSet.keys for pyright by @tamird in #1134\n - Close HTTPError response to prevent ResourceWarning on\n   Python 3.14 by @veeceey in #1133\n - Do not keep algorithms dict in PyJWK instances by @akx in\n   #1143\n - Use PyJWK algorithm when encoding without explicit\n   algorithm in #1148\n - Docs: Add PyJWKClient API reference and document the\n   two-tier caching system (JWK Set cache and signing key LRU\n   cache). \n\nUpdate to 2.11.0:\n \n - Enforce ECDSA curve validation per RFC 7518 Section 3.4.\n - Fix build system warnings by @kurtmckee in #1105\n - Validate key against allowed types for Algorithm family in\n   #964\n - Add iterator for JWKSet in #1041\n - Validate iss claim is a string during encoding and decoding\n   by @pachewise in #1040\n - Improve typing/logic for options in decode, decode_complete\n    by @pachewise in #1045\n - Declare float supported type for lifespan and timeout by\n   @nikitagashkov in #1068\n - Fix SyntaxWarnings/DeprecationWarnings caused by invalid\n   escape sequences by @kurtmckee in #1103\n - Development: Build a shared wheel once to speed up test\n   suite setup times by @kurtmckee in #1114\n - Development: Test type annotations across all supported\n   Python versions, increase the strictness of the type\n   checking, and remove the mypy pre-commit hook by @kurtmckee\n   in #1112\n - Support Python 3.14, and test against PyPy 3.10 and 3.11 by\n   @kurtmckee in #1104\n - Development: Migrate to build to test package building in\n   CI by @kurtmckee in #1108\n - Development: Improve coverage config and eliminate unused\n   test suite code by @kurtmckee in #1115\n - Docs: Standardize CHANGELOG links to PRs by @kurtmckee in\n   #1110\n - Docs: Fix Read the Docs builds by @kurtmckee in #1111\n - Docs: Add example of using leeway with nbf by @djw8605 in\n   #1034\n - Docs: Refactored docs with autodoc; added PyJWS and\n   jwt.algorithms docs by @pachewise in #1045\n - Docs: Documentation improvements for \"sub\" and \"jti\" claims\n   by @cleder in #1088\n - Development: Add pyupgrade as a pre-commit hook by\n   @kurtmckee in #1109\n - Add minimum key length validation for HMAC and RSA keys\n   (CWE-326). Warns by default via InsecureKeyLengthWarning\n   when keys are below minimum recommended lengths per RFC\n   7518 Section 3.2 (HMAC) and NIST SP 800-131A (RSA). Pass\n   enforce_minimum_key_length=True in options to PyJWT or\n   PyJWS to raise InvalidKeyError instead.\n - Refactor PyJWT to own an internal PyJWS instance instead of\n   calling global api_jws functions.\n  \nUpdate to 2.10.0:\n  \n * chore: use sequence for typing rather than list\n * Add support for Python 3.13\n * [pre-commit.ci] pre-commit autoupdate\n * Add an RTD config file to resolve RTD build failures\n * docs: Update iat exception docs\n * Remove algorithm requirement for JWT API\n * Create SECURITY.md\n * docs fix: decode_complete scope and algorithms\n * fix doctest for docs/usage.rst\n * fix test_utils.py not to xfail\n * Correct jwt.decode audience param doc expression\n * Add PS256 encoding and decoding usage\n * Add API docs for PyJWK\n * Refactor project configuration files from setup.cfg to pyproject.toml PEP-518\n * Add JWK support to JWT encode\n * Update pre-commit hooks to lint pyproject.toml\n * Add EdDSA algorithm encoding/decoding usage\n * Ruff linter and formatter changes\n * Validate sub and jti claims for the token\n * Add ES256 usage\n * Encode EC keys with a fixed bit length\n * Drop support for Python 3.8\n * Prepare 2.10.0 release\n * Bump codecov/codecov-action from 4 to 5\n","status":"published","published":"2026-03-26T08:57:07Z","modified":"2026-03-31T17:24:53.837398Z","updated_at":"2026-11-02T15:54:01.953589Z"}]}}
