Incorrect Behavior Order: Validate Before Canonicalize Affecting pyjwt package, versions [,2.14.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.2% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYJWT-20247706
  • published29 Sept 2026
  • disclosed28 Sept 2026
  • creditze3tar

Introduced: 28 Sep 2026

NewCVE-2026-102269  (opens in a new tab)
CWE-180  (opens in a new tab)

How to fix?

Upgrade PyJWT to version 2.14.0 or higher.

Overview

PyJWT is a Python implementation of RFC 7519.

Affected versions of this package are vulnerable to Incorrect Behavior Order: Validate Before Canonicalize via the _load method in jwt/api_jws.py, which accepts non-canonical base64url-encoded JWS segments. Because the library does not verify that a decoded-then-re-encoded segment round-trips to the original input, an attacker can supply a JWT whose header, payload, or signature segment is a non-canonical base64url encoding that decodes to the same bytes as a legitimate token. This allows the attacker to forge or manipulate tokens in ways that bypass integrity checks, leading to limited confidentiality and integrity impact.

CVSS Base Scores

version 4.0
version 3.1