{"id":"CVE-2025-24015","aliases":["CVE-2025-24015","GHSA-2x3r-hwv5-p32x"],"related":[],"kind":"vulnerability","state":"published","title":"Deno's AES GCM authentication tags are not verified","summary":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions 1.46.0 through 2.1.6 have an issue that affects AES-256-GCM and AES-128-GCM in Deno in which the authentication tag is not being validated. This means tampered ciphertexts or incorrect keys might not be detected, which breaks the guarantees expected from AES-GCM. Older versions of Deno correctly threw errors in such cases, as does Node.js. Without authentication tag verification, AES-GCM degrades to essentially CTR mode, removing integrity protection. Authenticated data set with set_aad is also affected, as it is incorporated into the GCM hash (ghash) but this too is not validated, rendering AAD checks ineffective. Version 2.1.7 includes a patch that addresses this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions 1.46.0 through 2.1.6 have an issue that affects AES-256-GCM and AES-128-GCM in Deno in which the authentication tag is not being validated. This means tampered ciphertexts or incorrect keys might not be detected, which breaks the guarantees expected from AES-GCM. Older versions of Deno correctly threw errors in such cases, as does Node.js. Without authentication tag verification, AES-GCM degrades to essentially CTR mode, removing integrity protection. Authenticated data set with set_aad is also affected, as it is incorporated into the GCM hash (ghash) but this too is not validated, rendering AAD checks ineffective. Version 2.1.7 includes a patch that addresses this issue.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThis affects AES-256-GCM and AES-128-GCM in Deno, introduced by commit [0d1beed](https://github.com/denoland/deno/commit/0d1beed). Specifically, the authentication tag is not being validated. This means tampered ciphertexts or incorrect keys might not be detected, which breaks the guarantees expected from AES-GCM. Older versions of Deno correctly threw errors in such cases, as does Node.js.\n\nWithout authentication tag verification, AES-GCM degrades to essentially CTR mode, removing integrity protection. Authenticated data set with set_aad is also affected, as it is incorporated into the GCM hash (ghash) but this too is not validated, rendering AAD checks ineffective.\n\n### PoC\n\n```ts\nimport { Buffer } from \"node:buffer\";\nimport {\n  createCipheriv,\n  createDecipheriv,\n  randomBytes,\n  scrypt,\n} from \"node:crypto\";\n\ntype Encrypted = {\n  salt: string;\n  iv: string;\n  enc: string;\n  authTag: string;\n};\n\nconst deriveKey = (key: string, salt: Buffer) =>\n  new Promise<Buffer>((res, rej) =>\n    scrypt(key, salt, 32, (err, k) => {\n      if (err) rej(err);\n      else res(k);\n    })\n  );\n\nasync function encrypt(text: string, key: string): Promise<Encrypted> {\n  const salt = randomBytes(32);\n  const k = await deriveKey(key, salt);\n\n  const iv = randomBytes(16);\n  const enc = createCipheriv(\"aes-256-gcm\", k, iv);\n  const ciphertext = enc.update(text, \"binary\", \"binary\") + enc.final(\"binary\");\n\n  return {\n    salt: salt.toString(\"binary\"),\n    iv: iv.toString(\"binary\"),\n    enc: ciphertext,\n    authTag: enc.getAuthTag().toString(\"binary\"),\n  };\n}\n\nasync function decrypt(enc: Encrypted, key: string) {\n  const k = await deriveKey(key, Buffer.from(enc.salt, \"binary\"));\n  const dec = createDecipheriv(\"aes-256-gcm\", k, Buffer.from(enc.iv, \"binary\"));\n\n  const out = dec.update(enc.enc, \"binary\", \"binary\");\n  dec.setAuthTag(Buffer.from(enc.authTag, \"binary\"));\n  return out + dec.final(\"binary\");\n}\n\nconst test = await encrypt(\"abcdefghi\", \"key\");\ntest.enc = \"\";\nconsole.log(await decrypt(test, \"\")); // no error\n```\n\n### Impact\n\nWhile discovered through experimentation, authentication failures that should raise errors may be silently ignored.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Deno es un entorno de ejecución de JavaScript, TypeScript y WebAssembly con valores predeterminados seguros. Las versiones 1.46.0 a 2.1.6 presentan un problema que afecta a AES-256-GCM y AES-128-GCM en Deno, donde la etiqueta de autenticación no se valida. Esto implica que podrían no detectarse textos cifrados alterados o claves incorrectas, lo que incumple las garantías esperadas de AES-GCM. Las versiones anteriores de Deno, al igual que Node.js, generaban errores correctamente en estos casos. Sin la verificación de la etiqueta de autenticación, AES-GCM se degrada al modo CTR, eliminando la protección de integridad. El conjunto de datos autenticado con set_aad también se ve afectado, ya que se incorpora al hash de GCM (ghash), pero este tampoco se valida, lo que inutiliza las comprobaciones de AAD. La versión 2.1.7 incluye un parche que soluciona este problema.","source":"nvd"}],"published":"2025-06-03T22:48:52.906Z","modified":"2026-09-10T03:50:24.817Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"version":">= 1.46.0, < 2.1.7","status":"affected"}],"vendor":"denoland","product":"deno","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.46.0","status":"affected","fixed":"2.1.7"}],"ecosystem":"crates.io","package":"deno","purl":"pkg:cargo/deno","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.102.0","status":"affected","fixed":"0.125.0"}],"ecosystem":"crates.io","package":"deno_node","purl":"pkg:cargo/deno_node","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.46.0","fixed":"2.1.7"}],"vendor":"deno","product":"deno","cpe":"cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-2x3r-hwv5-p32x","tags":["exploit","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/denoland/deno/commit/0d1beed","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/denoland/deno/commit/4f27d7cdc02e3edfb9d36275341fb8185d6e99ed","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/denoland/deno/commit/a4003a5292bd0affefad3ecb24a8732886900f67","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-24015","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/denoland/deno/commit/0d1beed2e3633d71d5e288e0382b85be361ec13d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/denoland/deno","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-06-04T13:47:24.881Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-24015","url":"https://www.cve.org/CVERecord?id=CVE-2025-24015","licence":"CVE Terms of Use","modified":"2025-06-04T19:15:04.623Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2x3r-hwv5-p32x","url":"https://github.com/advisories/GHSA-2x3r-hwv5-p32x","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:24.817Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-24015","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-24015","licence":"Public domain","modified":"2026-06-17T08:57:53.560Z"}],"updatedAt":"2026-11-25T22:58:58.713Z","epss":{"score":0.00459,"percentile":0.31769,"date":"2026-11-30T12:00:22.000Z"}}