CVE-2026-65625

Attacker-controlled AES-GCM authentication tag length allows tag forgery in jose

Published Oct 26, 2026 CVSS 4.0 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
The pure-Erlang AES-GCM fallback in jose_jwa_aes derives the number of verified authentication tag bits from the attacker-supplied tag itself. In the {aes_gcm, Bits} clause of block_decrypt/4, the incoming tag is guarded only by is_binary/1, with no check on its length. Verification in gcm_block_decrypt/6 then computes TBits = bit_size(T) and compares only those bits of the real 128-bit tag. An attacker who controls a JWE token can truncate the authentication tag to as little as 8 bits, so only 8 bits are ever checked. This reduces forgery resistance from 2^-128 to 2^-8, and a forged ciphertext is reliably accepted as authentic within 256 attempts without knowledge of the key (an authentication tag forgery and integrity bypass). Supplying a tag longer than 128 bits instead causes a badmatch that crashes the decrypting process. The fallback is reached through the public JWE decryption path whenever AES-GCM is not provided by a native crypto NIF, for example on FIPS or stripped or older OTP builds.

This issue affects jose: from 1.2.0 before 1.11.13.

Analysis

AI-generated

Technical impact

The vulnerability arises from the fallback AES‑GCM implementation in the pure‑Erlang module used by the jose library. The implementation calculates the number of bits to verify from the attacker‑supplied tag, allowing the tag length to be set arbitrarily. As a result, an attacker who controls a JWE token can truncate the authentication tag to as little as 8 bits, reducing forgery resistance from 2^128 to 2^8. A forged ciphertext is then accepted reliably as authentic within 256 attempts without key knowledge, and supplying too long a tag causes a crash. This constitutes an authentication tag forgery that bypasses integrity checks.

Affected Systems

The affected vendor is potatosalad and the product is jose. Versions from 1.2.0 up to (but not including) 1.11.13 are vulnerable; releases 1.11.13 and later contain the fix. The flaw is triggered only when the runtime does not provide native AES‑GCM support, such as on stripped or older OTP builds.

Risk and Exploitability

The CVSS score is 5.9, indicating moderate severity. EPSS data is not available and the issue is not listed in the CISA KEV catalog. The vulnerability can be exploited when an application processes JWE tokens on builds lacking native crypto support; an attacker can forge a token by truncating the tag, which is then accepted or causes a crash. Systems that rely on jose with non‑native AES‑GCM on older or stripped OTP environments are at risk of integrity bypass and potential service interruption.

Remediation

Vendor Workaround

Ensure the runtime provides a crypto provider with native AES-GCM support (a standard Erlang/OTP build linked against OpenSSL) so that JOSE dispatches AES-GCM to the native crypto NIF instead of the jose_jwa_aes fallback.


OpenCVE Recommended Actions

  • Upgrade the jose library to version 1.11.13 or later.
  • Configure the Erlang/OTP runtime to link against native OpenSSL AES‑GCM support so that JOSE uses the native crypto NIF.
  • If an immediate upgrade is not possible, avoid using JWE with AES‑GCM on stripped or older OTP builds, or switch to an algorithm that requires native crypto support.

Generated by OpenCVE AI on October 27, 2026 at 01:20 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': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The pure-Erlang AES-GCM fallback in jose_jwa_aes derives the number of verified authentication tag bits from the attacker-supplied tag itself. In the {aes_gcm, Bits} clause of block_decrypt/4, the incoming tag is guarded only by is_binary/1, with no check on its length. Verification in gcm_block_decrypt/6 then computes TBits = bit_size(T) and compares only those bits of the real 128-bit tag. An attacker who controls a JWE token can truncate the authentication tag to as little as 8 bits, so only 8 bits are ever checked. This reduces forgery resistance from 2^-128 to 2^-8, and a forged ciphertext is reliably accepted as authentic within 256 attempts without knowledge of the key (an authentication tag forgery and integrity bypass). Supplying a tag longer than 128 bits instead causes a badmatch that crashes the decrypting process. The fallback is reached through the public JWE decryption path whenever AES-GCM is not provided by a native crypto NIF, for example on FIPS or stripped or older OTP builds. This issue affects jose: from 1.2.0 before 1.11.13.
Title Attacker-controlled AES-GCM authentication tag length allows tag forgery in jose
First Time appeared Potatosalad
Potatosalad jose
Weaknesses CWE-354
CPEs cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*
Vendors & Products Potatosalad
Potatosalad jose
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-354

    Improper Validation of Integrity Check Value

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 2, 2026, 7:43 PM
Reserved
Jul 22, 2026, 1:55 PM
Status
Deferred
Published
Oct 26, 2026, 8:17 PM
Modified
Nov 2, 2026, 8:17 PM