{"id":"GHSA-2x3r-hwv5-p32x","revision":"0fe421b935f346c896c215b1943ab100","records":[{"revision":"0fe421b935f346c896c215b1943ab100","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-2x3r-hwv5-p32x","aliases":["CVE-2025-24015"],"title":"Deno's AES GCM authentication tags are not verified","description":"### 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.","state":0,"publishedAt":"2025-06-04T20:48:56+00:00","modifiedAt":"2026-09-10T03:50:24.8175116+00:00","affected":[{"ecosystem":"crates.io","name":"deno","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.46.0"},{"kind":"fixed","version":"2.1.7"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"crates.io","name":"deno_node","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.102.0"},{"kind":"fixed","version":"0.125.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","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":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/denoland/deno/security/advisories/GHSA-2x3r-hwv5-p32x","https://nvd.nist.gov/vuln/detail/CVE-2025-24015","https://github.com/denoland/deno/commit/0d1beed","https://github.com/denoland/deno/commit/0d1beed2e3633d71d5e288e0382b85be361ec13d","https://github.com/denoland/deno/commit/4f27d7cdc02e3edfb9d36275341fb8185d6e99ed","https://github.com/denoland/deno/commit/a4003a5292bd0affefad3ecb24a8732886900f67","https://github.com/denoland/deno"],"sourceUrl":"https://github.com/advisories/GHSA-2x3r-hwv5-p32x","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-2x3r-hwv5-p32x","identifiers":["GHSA-2x3r-hwv5-p32x","CVE-2025-24015"]},"retained":false,"historicalAffected":[]}],"coverage":[]}