Skip to content

← Public intelligence

PyPI package

python-jwt

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

1 actionable advisory, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Critical, CVSS 9.3PyPIAmendedPublished

    python-jwt vulnerable to token forgery with new claims

    CVE-2022-39227 · GHSA-5p8v-58qm-c7fp

    Affected
    • PyPI python-jwt < 3.3.4
    Fixed in
    3.3.4· Vendor fix available
    Issue
    Impact An attacker who obtains a JWT can arbitrarily forge its contents without knowing the secret key. Depending on the application, this may for example enable the attacker to spoof other user's identities, hijack their sessions, or bypass authentication. Patches Users should upgrade to version 3.3.4 Fixed by: https://github.com/davedoesdev/python-jwt/commit/88ad9e67c53aa5f7c43ec4aa52ed34b7930068c9 Workarounds None References Found by Tom Tervoort https://github.com/pypa/advisory-database/blob/main/vulns/python-jwt/PYSEC-2022-259.yaml More information The vulnerability allows an attacker, who possesses a single valid JWT, to create a new token with forged claims that the verifyjwt function will accept as valid. The issue is caused by an inconsistency between the JWT parsers used by python-jwt and its dependency jwcrypto. By mixing compact and JSON representations, an attacker can trick jwcrypto of parsing different claims than those over which a signature is validated by jwcrypto.…

    Recommended action: Upgrade to 3.3.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →