PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard — GHSA-P4G4-X82P-Q773
GitHub · GitHub · GHSA-P4G4-X82P-Q773
ID
GHSA-P4G4-X82P-Q773
GHSA-P4G4-X82P-Q773
Date
Source
GitHub
GitHub
Vendor
GitHub
GitHub
Threat
high
high
CVSS
7.4
7.4
EPSS
0.00175
0.00175
Summary
### Summary `HMACAlgorithm.prepare_key` blocks asymmetric keys from being used as HMAC secrets by searching for text markers only. It looks for `-----BEGIN` and for an `ssh-` prefix. The same key in DER form is binary ASN.1 and has neither marker, so it passes the check and is used as an HMAC secret. An application that verifies tokens with an RSA or EC public key, and also allows HS256 with that same key, can be…
Timeline
- Published by source
- 2026-09-29
Risk context
- Reported severity or threat level: high.
- Reported CVSS score: 7.4 out of 10.
- Reported EPSS value: 0.00175.
- Review exposure for the affected product or family: pip: pyjwt.
Product
pip: pyjwt
What to do
General, cautious steps (verify details in the official source):
- Prioritize patching or mitigation immediately (treat as actively risky).
- Identify affected product versions in your inventory and verify whether you are impacted.
- Apply vendor patches/updates or recommended mitigations as soon as available.
- Read the official advisory for exact affected versions and remediation steps.
Official advisory
Evidence and provenance
- Canonical advisory ID
- GHSA-P4G4-X82P-Q773
- Source
- GitHub
- Vendor
- GitHub
- Published by source
- 2026-09-29
- Last source activity
- 2026-09-29
- Additional identifiers
- CVE-2026-102271
- Curated by
- hlukh.ch
Related advisories and connections
These advisories are connected by shared CVE, product, vendor, source, or time signals.