CVE-2026-48526: PyJWT: Public-key JWK accepted as HMAC secret enables forged HS256 tokens when mixed families are allowed
PyJWT is a JSON Web Token implementation in Python. Prior to 2.13.0, when the verifier is decoding JSON Web Tokens, while supporting both asymmetric and HMAC algorithms, the library does not validate use of JSON Web Keys in HMAC algorithm, allowing attacker to use the issuer public key as the secret key for HMAC algorithm. This vulnerability is fixed in 2.13.0.
Security readout for executives and security teams
Plain-English summary
PyJWT versions before 2.13.0 can mishandle JWT verification when an application permits both HMAC and public-key algorithms. In that configuration, an attacker may be able to make a forged token verify using the issuer's public key as an HMAC secret. This is most urgent for authentication and API services using PyJWT for authorization decisions.
Executive priority
Treat as high priority for internet-facing login, API gateway, and identity-adjacent services. Patch quickly where PyJWT verifies authorization-bearing tokens, but prioritize validation of the risky mixed-algorithm configuration before emergency business disruption.
Technical view
The issue is an algorithm/key-family confusion flaw in PyJWT JWT decoding. When both asymmetric and HMAC algorithms are supported, public-key JWK material is not rejected for HMAC use. This can enable forged HS256-style tokens. The upstream fix is PyJWT 2.13.0. Reported CWEs are CWE-287 and CWE-347.
Likely exposure
Exposure is likely limited to Python services using PyJWT before 2.13.0 that verify JWTs while allowing both HMAC and asymmetric algorithms. Risk is higher where public keys or JWKs are discoverable and token claims drive authentication, authorization, or tenant isolation.
Exploitation context
The bundle does not show KEV listing or active exploitation evidence. Exploitation is not described as trivial: CVSS marks attack complexity high, and the vulnerable configuration requires mixed algorithm families during verification.
Researcher notes
Focus review on decode paths that accept both symmetric and asymmetric algorithms. The core condition is public-key JWK acceptance in an HMAC verification context. Sources provide the fixed version but not detailed exploitation telemetry, so avoid assuming compromise without local evidence.
Mitigation direction
Upgrade PyJWT to version 2.13.0 or later.
Restrict accepted JWT algorithms to the expected family for each issuer.
Do not reuse asymmetric public-key material in HMAC verification paths.
Check Red Hat advisories for affected downstream packages and fixes.
Review authentication services for mixed HS* and RS*/ES* decode configurations.
Validation and detection
Inventory Python services and dependency locks for PyJWT versions below 2.13.0.
Review JWT decoding calls for broad or mixed algorithm allowlists.
Confirm each issuer uses the intended key type and algorithm family.
Check whether public JWKs are used near HMAC verification code paths.
Verify patched packages are deployed in production images and runtimes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-287: Credential and account abuse lookup
Authentication and credential weaknesses can make valid-account abuse and credential telemetry useful review starting points. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
24Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-287 · source CWE mapping
Improper Authentication
Improper Authentication represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improper Verification of Cryptographic Signature represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.