CVE-2026-102269 in PyJWTinfo

Summary

by MITRE • 09/29/2026

PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, PyJWT signature segment is affected because signature segment decoding accepts characters outside the canonical Base64URL representation. This occurs when non-Base64URL characters are appended to a valid compact JWS signature segment. As a result, base64url_decode produces the same signature bytes for different serialized segments. Consequently, raw-token revocation checks can fail to recognize an equivalent modified token. This issue is fixed in version 2.14.0.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 09/29/2026

The vulnerability identified in PyJWT prior to version 2.14.0 stems from a lax validation mechanism within the library's signature decoding process, specifically affecting how Base64URL encoded data is processed during JSON Web Signature verification. In standard cryptographic implementations adhering to RFC 7515 and related specifications, strict adherence to canonical encoding formats is critical for ensuring token integrity. The flaw arises because the base64url_decode function in affected versions accepts characters that fall outside the defined Base64URL alphabet when appended to a valid compact JWS signature segment. This permissiveness allows an attacker or malicious actor to append non-canonical padding or extra bytes to the end of a legitimate signature without triggering immediate validation errors during the decoding phase, thereby creating ambiguity in how the resulting byte sequence is interpreted by downstream verification logic.

This technical flaw leads directly to a significant security bypass known as token forgery or signature manipulation via encoding normalization attacks. Because the decoder produces identical raw signature bytes for different serialized segments that differ only by these non-canonical trailing characters, an attacker can modify the payload of a JSON Web Token and append altered but functionally equivalent signature data. When systems rely on this library to verify tokens, they may accept the modified token as valid because the decoded signature matches the expected hash derived from the tampered payload. This effectively neutralizes the cryptographic guarantee provided by digital signatures, allowing unauthorized access or privilege escalation if the application trusts such manipulated tokens for authentication or authorization decisions.

The operational impact of this vulnerability is severe in environments where PyJWT is used to manage session states, API authentication, or single sign-on flows. Attackers can exploit this weakness to bypass raw-token revocation checks and other integrity validations that depend on exact signature matching. For instance, if a system attempts to revoke a token by blacklisting its identifier but fails to account for the encoding ambiguity, an attacker could present a revoked token with modified trailing characters in the signature segment, which would still be accepted as valid due to the identical decoded bytes. This undermines trust mechanisms and can lead to unauthorized data access, session hijacking, or complete compromise of application security boundaries that rely on JWT integrity.

To mitigate this risk, organizations must immediately upgrade PyJWT to version 2.14.0 or later, where strict canonical Base64URL validation has been enforced to reject any signature segments containing non-canonical characters. In the interim, developers should implement additional defensive coding practices such as manually validating that all JWT components strictly conform to RFC 7519 and RFC 7515 specifications before passing them to the library for verification. This includes ensuring no trailing whitespace or invalid base64 padding is present in signature fields. Furthermore, security teams should review their token validation logic to ensure it does not rely solely on cryptographic signatures without supplementary checks like audience claims, expiration times, and issuer validations to provide defense-in-depth against such encoding-based bypasses.

From a classification perspective, this vulnerability aligns with CWE-20 Improper Input Validation, as the software fails to restrict input characters in the signature segment according to established standards. It also relates to CWE-345 Insufficient Verification of Data Authenticity because the system accepts data that appears authentic due to ambiguous encoding but may have been tampered with. In terms of offensive security frameworks, this exploit technique corresponds to ATT&CK T1556.007 Modifying JSON Web Tokens, specifically leveraging signature manipulation through encoding normalization flaws. Addressing these issues requires both immediate patching and long-term architectural reviews to ensure that all cryptographic libraries enforce strict canonical formats as mandated by industry standards for secure token handling.

Responsible

GitHub M

Reservation

09/28/2026

Disclosure

09/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!