<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-01T03:35:10.710832+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/cve-2026-102271</id>
    <title>CVE-2026-102271 — PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard</title>
    <updated>2026-10-01T03:35:10.712936+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> jpadilla pyjwt</p>
<p>PyJWT is a Python implementation of JSON Web Token standards. From 2.4.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because asymmetric-key guard relies on textual markers that are absent from DER encoding. This occurs when an application mixes HMAC and asymmetric algorithms and supplies a DER public key as the shared verification key. As a result, PyJWT uses public DER bytes as an HMAC secret. Consequently, an attacker who knows the public key can forge authenticated HMAC tokens. This issue is fixed in version 2.14.0.</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/cve-2026-102271"/>
  </entry>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-p4g4-x82p-q773</id>
    <title>GHSA-p4g4-x82p-q773 — PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard</title>
    <updated>2026-10-01T03:35:10.713029+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: pyjwt</p>
<p>### Summary</p>
<p>`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.</p>
<p>An application that verifies tokens with an RSA or EC public key, and also allows HS256 with that same key, can be given a forged token. The attacker signs it with the public key, which is public. This is the key confusion problem CVE-2022-29217 was filed for, reachable again through a different encoding.</p>
<p>The reach is smaller than the original CVE. The application must already be in that misconfiguration, and it must hold its public key as DER bytes rather than PEM.</p>
<p>### Details</p>
<p>The guard is at `jwt/algorithms.py:331`:</p>
<p>```python
if is_pem_format(key_bytes) or is_ssh_key(key_bytes):
    raise InvalidKeyError(
        "The specified key is an asymmetric key or x509 certificate and"
        " should not be used as an HMAC secret."
    )
```</p>
<p>Both helpers are text matchers. Neither one parses the key.</p>
<p>- `jwt/utils.py:126`, `is_pem_format`, runs a regex for `----[- ]BEGIN ...----`.
- `jwt/utils.py:141`, `is_ssh_key`, checks `startswith` against a list of `ssh-` and `ecdsa-sha2-` prefixes.</p>
<p>A DER encoded public key starts with the bytes `0x30 0x82`. It matches neither, so `prepare_key` returns it unchanged and it becomes the HMAC secret.</p>
<p>There is no DER handling anywhere in the…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-p4g4-x82p-q773"/>
  </entry>
</feed>
