REDHAT-BUG-2508524: Medium severity pypi/joserfc vulnerability

Published Jul 29, 2026
·
Updated

joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. in versions 1.7.1 and prior, joserfc accepts JWTs with trailing padding (==) which are not conforming to the JOSE specifications. This leads to malleability of the JWTs when consumed by joserfc. Depending on this application this might or not be an issue. This could lead to bypass of token revocation or anti-replay protection when implemented as a deny list of tokens or a deny list of token hashes. Note that ECDSA JWS are always malleable because of the malleability of ECDSA signatures (first test case in the code bellow). This makes a scheme which assumes that JWTs are not malleable brittle. However for other signatures (or MAC) schemes it might make sense to assume non malleability of the token. This issue has been fixed in version 1.7.2.

Affected Software

1 affected component
pypi/joserfc<=1.7.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade joserfc to a version that resolves this vulnerability.

    Fixed in 1.7.2

Event History

Jul 29, 2026
Data Sourced
via Red Hat·07:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are most likely to be affected by this behavior?

Applications that consume JWTs with joserfc and implement token revocation or anti-replay controls using a deny list of raw tokens or token hashes may be affected. The impact depends on whether those controls assume that a JWT has only one valid serialized representation.

2

What does an attacker need to exploit it?

An attacker needs a JWT that is accepted by the application and an application workflow where an equivalent, modified token representation can bypass a token-based or token-hash-based deny list. The issue involves JWTs with trailing "==" padding accepted by affected joserfc versions.

3

Are all JWT signature schemes equally relevant to this issue?

No. ECDSA JWS are always malleable due to ECDSA signature malleability, so designs relying on JWT non-malleability are already brittle for ECDSA. For other signature or MAC schemes, applications may reasonably have assumed non-malleability, making the trailing-padding acceptance more relevant.

4

What version addresses the issue?

The issue is fixed in joserfc version 1.7.2. Versions 1.7.1 and earlier are described as accepting non-conforming JWTs with trailing padding.

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