Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: Official CVE List

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.

Products
jose
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-65625
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 19:51 UTC · Revision 1

Source evidence

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

core-cve · Original source

Published 26 Oct 2026, 19:52 UTC

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.

cve:CVE-2026-65625

jose

Fixed versions: Not specified

jose

Fixed versions: Not specified

Complete source record
{
  "id": "b1b3f39cd8dccc43bdbe337fd198886491d30d14d4881caea6a3d6c5a0a38851",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-65625",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Attacker-controlled AES-GCM authentication tag length allows tag forgery in jose",
    "summary": "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.",
    "evidence": "cve:CVE-2026-65625",
    "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-65625",
      "aliases": [
        "CVE-2026-65625"
      ],
      "metrics": [
        {
          "format": "CVSS",
          "cvssV4_0": {
            "Safety": "NOT_DEFINED",
            "version": "4.0",
            "Recovery": "NOT_DEFINED",
            "baseScore": 5.9,
            "Automatable": "NOT_DEFINED",
            "attackVector": "LOCAL",
            "baseSeverity": "MEDIUM",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "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",
            "providerUrgency": "NOT_DEFINED",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "attackRequirements": "PRESENT",
            "privilegesRequired": "NONE",
            "subIntegrityImpact": "NONE",
            "vulnIntegrityImpact": "HIGH",
            "subAvailabilityImpact": "NONE",
            "vulnAvailabilityImpact": "LOW",
            "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_jwa_aes"
          ],
          "product": "jose",
          "versions": [
            {
              "status": "affected",
              "version": "1.2.0",
              "lessThan": "1.11.13",
              "versionType": "semver"
            }
          ],
          "packageURL": "pkg:hex/jose",
          "packageName": "jose",
          "programFiles": [
            "src/jwa/jose_jwa_aes.erl"
          ],
          "collectionURL": "https://repo.hex.pm",
          "defaultStatus": "unaffected",
          "programRoutines": [
            {
              "name": "jose_jwa_aes:block_decrypt/4"
            },
            {
              "name": "jose_jwa_aes:gcm_block_decrypt/6"
            }
          ]
        },
        {
          "cpes": [
            "cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
          ],
          "repo": "https://github.com/potatosalad/erlang-jose",
          "vendor": "potatosalad",
          "modules": [
            "jose_jwa_aes"
          ],
          "product": "jose",
          "versions": [
            {
              "status": "affected",
              "version": "8848b172575fb7d7e1e2977e8ae0a21678d2157a",
              "lessThan": "3fa1f8e3efda0da5ce6f4c9984789f979dc02740",
              "versionType": "git"
            }
          ],
          "packageURL": "pkg:github/potatosalad/erlang-jose",
          "packageName": "potatosalad/erlang-jose",
          "programFiles": [
            "src/jwa/jose_jwa_aes.erl"
          ],
          "collectionURL": "https://github.com",
          "defaultStatus": "unaffected",
          "programRoutines": [
            {
              "name": "jose_jwa_aes:block_decrypt/4"
            },
            {
              "name": "jose_jwa_aes:gcm_block_decrypt/6"
            }
          ]
        }
      ],
      "modified": "2026-10-26T19:52:54.987Z",
      "provider": "cve",
      "references": [
        "https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-6gxw-6f7r-cjr6",
        "https://cna.erlef.org/cves/CVE-2026-65625.html",
        "https://osv.dev/vulnerability/EEF-CVE-2026-65625",
        "https://github.com/potatosalad/erlang-jose/commit/8848b172575fb7d7e1e2977e8ae0a21678d2157a",
        "https://github.com/potatosalad/erlang-jose/commit/3fa1f8e3efda0da5ce6f4c9984789f979dc02740"
      ],
      "provider_metadata": {
        "cna": {
          "orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
          "shortName": "EEF",
          "dateUpdated": "2026-10-26T19:52:54.987Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-65625",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 338317,
  "published_at": "2026-10-26T19:52:54.987+00:00"
}