Skip to content
Submit incident
AII-1002-53689
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.Supporting sources are pending verification.

PyJWT issuer field partial matches accepted in version 2.10.0

A bug in PyJWT version 2.10.0 allowed partial string matches for the JWT issuer ("iss") claim instead of exact matches, due to a code change from `list` to `Sequence` type checking. The vulnerability was patched in version 2.10.1.

29 November 2024 Β· PyJWT Β· Security and cyberattacks
29 November 2024
AII-1002-53689
Quick facts
Organization
PyJWT (subject)
Category
Security and cyberattacks
Date
29 November 2024
Drafted by
Raidu Incident Detection

What happened

PyJWT version 2.10.0 introduced a bug in the JWT issuer claim validation. The code changed from checking isinstance(issuer, list) to isinstance(issuer, Sequence), which caused string comparisons to use the in operator instead of equality checking.

This allowed partial string matches for the "iss" claim. For example, a token with issuer "urn:" would be accepted when the expected issuer was "urn:expected", because the substring check "urn:" in "urn:expected" returns true.

Reported impact

The real-world impact is assessed as low because the JWT signature still must match for token validation to succeed. However, the issuer validation could be bypassed by creating tokens with partial issuer strings that match the expected issuer as a substring.

Governance controls

PyJWT published a security advisory (GHSA-75c5-xw7c-p5pm) describing the bug and released version 2.10.1 with a fix. Unit tests were added to prevent regression.

Classification

Organization
PyJWT (subject)
Category
Security and cyberattacks
Industry
Digital security
Harm status
Potential harm
Intent
Unintentional
Timing
Unknown
Harmed
Consumers
Failure modes
Hallucination
Consequences
None recorded

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident