PyJWT@1.3.0

JSON Web Token implementation in Python

  • latest version

    2.12.1

  • latest non vulnerable version

  • first published

    15 years ago

  • latest version published

    1 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the PyJWT package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Improper Verification of Cryptographic Signature

    Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature due to improper validation of the crit header parameter. An attacker can bypass critical header checks by crafting a JSON Web Signature (JWS) token with unrecognized critical extensions.

    How to fix Improper Verification of Cryptographic Signature?

    Upgrade pyjwt to version 2.12.0 or higher.

    [,2.12.0)
    • H
    Authentication Bypass

    pyjwt is a JSON Web Token implementation in Python.

    Affected versions of the package are vulnerable to Authentication Bypass. In PyJWT 1.5.0 and below the invalid_strings check in HMACAlgorithm.prepare_key does not account for all PEM encoded public keys. Specifically, the PKCS1 PEM encoded format would be allowed because it is prefaced with the string -----BEGIN RSA PUBLIC KEY----- which is not accounted for. This enables symmetric/asymmetric key confusion attacks against users using the PKCS1 PEM encoded public keys, which would allow an attacker to craft JWTs from scratch.

    How to fix Authentication Bypass?

    Upgrade pyjwt to version 1.5.1 or higher.

    [,1.5.1)