PYSEC-2026-4152: PyJWT: Malformed RSA JWK aborts parsing of an entire JWK Set

Published Sep 28, 2026
·
Updated

PyJWT is a Python implementation of JSON Web Token standards. From 2.9.0 until 2.14.0, PyJWKSet does not catch the plain ValueError raised for malformed RSA JWK components by RSAAlgorithm.fromjwk in jwt/apijwk.py. This occurs when a JWK Set contains a malformed RSA key alongside otherwise usable keys. As a result, one malformed member aborts construction of the entire PyJWKSet. Consequently, applications can experience authentication failures or request-level denial of service. This issue is fixed in version 2.14.0.

Affected Software

1 affected component
pypi/pyjwt>=2.9.0<2.14.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PyJWT to a version that resolves this vulnerability.

    Fixed in 2.14.0

Event History

Sep 28, 2026
CVE Published
via OSV·08:42 PM
Data Sourced
via OSV·08:42 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Applications using PyJWT versions from 2.9.0 up to, but not including, 2.14.0 are affected when they construct a PyJWKSet from a JWK Set containing a malformed RSA key alongside usable keys.

2

What does an attacker need to trigger the impact?

The application must process a JWK Set that includes a malformed RSA JWK component. The malformed member causes PyJWKSet construction to abort, even if other keys in the set are valid, resulting in authentication failures or request-level denial of service.

3

How can the issue be remediated?

Upgrade PyJWT to version 2.14.0, which fixes the uncaught ValueError raised while parsing malformed RSA JWK components.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203