ECDSA signature length is not validated in jose, allowing signature malleability
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.
- Products
- jose
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-65632
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 19:51 UTC · Revision 1
Source evidence
ECDSA signature length is not validated in jose, allowing signature malleability
core-cve · Original sourcePublished 26 Oct 2026, 19:53 UTC
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.
cve:CVE-2026-65632
jose
Fixed versions: Not specified
jose
Fixed versions: Not specified
Complete source record
{
"id": "0da365325ffdd403b826259ad19b151058b0c47df529d509d4d2b96cb8566f78",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-65632",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ECDSA signature length is not validated in jose, allowing signature malleability",
"summary": "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.",
"evidence": "cve:CVE-2026-65632",
"products": [
{
"name": {
"value": "jose",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
},
{
"name": {
"value": "jose",
"evidence": "/containers/cna/affected/1/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-65632",
"aliases": [
"CVE-2026-65632"
],
"metrics": [
{
"format": "CVSS",
"cvssV4_0": {
"Safety": "NOT_DEFINED",
"version": "4.0",
"Recovery": "NOT_DEFINED",
"baseScore": 5.1,
"Automatable": "NOT_DEFINED",
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"valueDensity": "NOT_DEFINED",
"vectorString": "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",
"providerUrgency": "NOT_DEFINED",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"attackRequirements": "NONE",
"privilegesRequired": "NONE",
"subIntegrityImpact": "NONE",
"vulnIntegrityImpact": "LOW",
"subAvailabilityImpact": "NONE",
"vulnAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"vulnConfidentialityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"affected": [
{
"cpes": [
"cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
],
"repo": "https://github.com/potatosalad/erlang-jose",
"vendor": "potatosalad",
"modules": [
"jose_jwk_kty_ec"
],
"product": "jose",
"versions": [
{
"status": "affected",
"version": "1.0.0",
"lessThan": "1.11.13",
"versionType": "semver"
}
],
"packageURL": "pkg:hex/jose",
"packageName": "jose",
"programFiles": [
"src/jwk/jose_jwk_kty_ec.erl"
],
"collectionURL": "https://repo.hex.pm",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "jose_jwk_kty_ec:verify/4"
}
]
},
{
"cpes": [
"cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
],
"repo": "https://github.com/potatosalad/erlang-jose",
"vendor": "potatosalad",
"modules": [
"jose_jwk_kty_ec"
],
"product": "jose",
"versions": [
{
"status": "affected",
"version": "a7746ecd4950f85a393136e449a91dac62b5c429",
"lessThan": "72ce1866622b9329347dc52a94173ac0317bc9cf",
"versionType": "git"
}
],
"packageURL": "pkg:github/potatosalad/erlang-jose",
"packageName": "potatosalad/erlang-jose",
"programFiles": [
"src/jwk/jose_jwk_kty_ec.erl"
],
"collectionURL": "https://github.com",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "jose_jwk_kty_ec:verify/4"
}
]
}
],
"modified": "2026-10-26T19:53:56.649Z",
"provider": "cve",
"references": [
"https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-44hw-rpw9-mwg4",
"https://cna.erlef.org/cves/CVE-2026-65632.html",
"https://osv.dev/vulnerability/EEF-CVE-2026-65632",
"https://github.com/potatosalad/erlang-jose/commit/a7746ecd4950f85a393136e449a91dac62b5c429",
"https://github.com/potatosalad/erlang-jose/commit/72ce1866622b9329347dc52a94173ac0317bc9cf"
],
"provider_metadata": {
"cna": {
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF",
"dateUpdated": "2026-10-26T19:53:56.649Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-65632",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 338325,
"published_at": "2026-10-26T19:53:56.649+00:00"
}