CVE-2026-65632

ECDSA signature length is not validated in jose, allowing signature malleability

Published Oct 26, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
The jose library accepts ECDSA (ES256, ES256K, ES384, and ES512) JWS signatures of a non-canonical length. When verifying an ECDSA signature, jose_jwk_kty_ec:verify/4 in src/jwk/jose_jwk_kty_ec.erl splits the raw signature in half by its actual byte length (split_binary(Signature, byte_size(Signature) div 2)) instead of enforcing the fixed length required by RFC 7518 §3.4, and then decodes each half with crypto:bytes_to_integer/1, which ignores leading zero bytes.

As a result, an attacker who holds one valid token can prepend leading zero bytes to each of the R and S halves to produce longer signatures that still split evenly and decode to the same (r, s) pair, so many distinct signature byte strings all verify against the same key (signature malleability). This does not allow forging new payloads or impersonating a signer, because the underlying (r, s) values are unchanged. It does defeat any security control that assumes a valid token or its signature is unique, such as token-revocation-by-hash, replay or idempotency caches, and deduplication logic.

This issue affects jose: from 1.0.0 before 1.11.13.

Analysis

AI-generated

Technical impact

The vulnerability in the jose library allows the ECDSA signature to be of non-canonical length because the library splits the raw signature by its actual byte size instead of the fixed length required by the standard. A malicious actor who already holds a valid signature can prepend leading zero bytes to each half of the signature, creating many distinct byte strings that still decode to the same (r, s) pair. While this does not allow new payloads or impersonation, it means that a single valid token can be reproduced in multiple forms, undermining any system that relies on the uniqueness of a token's signature for cache invalidation, revocation logic, replay protection, or deduplication.

Affected Systems

Affected systems include the potatosalad jose library versions from 1.0.0 up to, but not including, 1.11.13. Any application that imports this library to verify JSON Web Signatures and uses the canonical signature format would be susceptible.

Risk and Exploitability

The CVSS score of 5.1 indicates moderate severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires an attacker to possess a legitimate token; once such a token is obtained—through user credentials, a bug in the issuing service, or a breach—the attacker can duplicate the token’s signature arbitrarily, potentially bypassing token revocation or cache invalidation mechanisms. No direct code execution or remote exploitation is possible from this flaw alone.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade potatosalad jose to version 1.11.13 or later
  • Verify that the application does not rely on token revocation or caching based solely on the signature hash; refactor to use token identifiers or timestamps instead
  • If upgrading is not immediately feasible, add application-level validation to reject ECDSA signatures that exceed the canonical length or contain leading zero bytes

Generated by OpenCVE AI on October 27, 2026 at 01:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The jose library accepts ECDSA (ES256, ES256K, ES384, and ES512) JWS signatures of a non-canonical length. When verifying an ECDSA signature, jose_jwk_kty_ec:verify/4 in src/jwk/jose_jwk_kty_ec.erl splits the raw signature in half by its actual byte length (split_binary(Signature, byte_size(Signature) div 2)) instead of enforcing the fixed length required by RFC 7518 §3.4, and then decodes each half with crypto:bytes_to_integer/1, which ignores leading zero bytes. As a result, an attacker who holds one valid token can prepend leading zero bytes to each of the R and S halves to produce longer signatures that still split evenly and decode to the same (r, s) pair, so many distinct signature byte strings all verify against the same key (signature malleability). This does not allow forging new payloads or impersonating a signer, because the underlying (r, s) values are unchanged. It does defeat any security control that assumes a valid token or its signature is unique, such as token-revocation-by-hash, replay or idempotency caches, and deduplication logic. This issue affects jose: from 1.0.0 before 1.11.13.
Title ECDSA signature length is not validated in jose, allowing signature malleability
First Time appeared Potatosalad
Potatosalad jose
Weaknesses CWE-347
CPEs cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*
Vendors & Products Potatosalad
Potatosalad jose
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 2, 2026, 9:30 PM
Reserved
Jul 22, 2026, 1:58 PM
Status
Deferred
Published
Oct 26, 2026, 8:17 PM
Modified
Nov 2, 2026, 10:17 PM