---
id: "CVE-2026-65625"
kind: "vulnerability"
aliases: ["CVE-2026-65625"]
title: "jose (Erlang): truncated AES-GCM tag lets forged JWE ciphertexts pass"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["elixir", "erlang", "fips", "jose", "jwe", "package"]
not_affected_if: ["jose-1.11.13-or-later", "native-aes-gcm", "no-jwe-decryption"]
published_at: "2026-10-26T20:17:57+00:00"
first_seen_at: "2026-10-26T20:50:17+00:00"
updated_at: "2026-10-26T20:51:52+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-65625", "first_seen_at": "2026-10-26T20:50:17+00:00"}]
---

# jose (Erlang): truncated AES-GCM tag lets forged JWE ciphertexts pass

The pure-Erlang AES-GCM fallback in jose accepts an attacker-truncated authentication tag, checking only as few as 8 bits. An attacker who controls a JWE token can forge ciphertext that is accepted as authentic within about 256 attempts, without the key; an oversized tag instead crashes the decrypting process.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed jose version in the Erlang project's `rebar.lock` or `mix.lock`, or run `rebar3 tree | grep jose`; affected versions are from `1.2.0` before `1.11.13`.
- Check whether the runtime uses a native crypto NIF for AES-GCM: the fallback is used when AES-GCM is not provided by a native crypto NIF, for example on FIPS, stripped or older OTP builds.

## Fix

- Upgrade jose to `1.11.13` or later.

## Timeline

- 2026-10-26T20:50:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-65625

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
