CVE-2025-24015: Deno Deno's AES GCM Authentication Tags Vulnerability

HIGH
Advisory Identifier: GHSA-2x3r-hwv5-p32x
CWE-347
Published
Advisory Summary

CVE-2025-24015 is a HIGH deno's aes gcm authentication tags vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Deno libraries in the crates.io ecosystem. The issue involves deno's aes gcm authentication tags are not verified. Remediation is available by upgrading affected packages to version 2.1.7, 0.125.0.

CVE-2025-24015 at a Glance

CVE Identifier CVE-2025-24015
GHSA Identifier GHSA-2x3r-hwv5-p32x
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Deno
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-24015

To remediate this vulnerability, upgrade all affected Deno dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

deno fixed: 2.1.7
Upgrade deno to 2.1.7
deno_node fixed: 0.125.0
Upgrade deno_node to 0.125.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for deno

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-24015, inspect your project dependencies for Deno:

inspect dependencies for deno

Analyze the terminal output to locate any version of Deno in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Deno, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary This 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. 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. ### PoC ```ts import { Buffer } from "node:buffer"; import { createCipheriv, createDecipheriv, randomBytes, scrypt, } from "node:crypto"; type Encrypted = { salt: string; iv: string; enc: string; authTag: string; }; const deriveKey = (key: string, salt: Buffer) => new Promise<Buffer>((res, rej) => scrypt(key, salt, 32, (err, k) => { if (err) rej(err); else res(k); }) ); async function encrypt(text: string, key: string): Promise<Encrypted> { const salt = randomBytes(32); const k = await deriveKey(key, salt); const iv = randomBytes(16); const enc = createCipheriv("aes-256-gcm", k, iv); const ciphertext = enc.update(text, "binary", "binary") + enc.final("binary"); return { salt: salt.toString("binary"), iv: iv.toString("binary"), enc: ciphertext, authTag: enc.getAuthTag().toString("binary"), }; } async function decrypt(enc: Encrypted, key: string) { const k = await deriveKey(key, Buffer.from(enc.salt, "binary")); const dec = createDecipheriv("aes-256-gcm", k, Buffer.from(enc.iv, "binary")); const out = dec.update(enc.enc, "binary", "binary"); dec.setAuthTag(Buffer.from(enc.authTag, "binary")); return out + dec.final("binary"); } const test = await encrypt("abcdefghi", "key"); test.enc = ""; console.log(await decrypt(test, "")); // no error ``` ### Impact While discovered through experimentation, authentication failures that should raise errors may be silently ignored.

CVE-2025-24015 Affected Deno Versions

2 component(s)
Fixed Versions:
2.1.70.125.0
Product / Package Ecosystem Affected Versions Fixed Version
deno
crates.io
≥ 1.46.0
< 2.1.7
2.1.7
deno_node
crates.io
≥ 0.102.0
< 0.125.0
0.125.0

References

Frequently Asked Questions

What is CVE-2025-24015?
CVE-2025-24015 is a security vulnerability in Deno involving Deno's AES GCM authentication tags are not verified under CWE-347: Improper Verification of Cryptographic Signature.
Which Deno versions are affected?
Affected versions include releases prior to 2.1.7, 0.125.0 across affected packages: deno, deno_node.
What version fixes CVE-2025-24015?
Upgrading to 2.1.7, 0.125.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is deno affected?
Yes, deno is affected in releases prior to 2.1.7. Upgrade your dependency to 2.1.7 or later.
Is deno_node affected?
Yes, deno_node is affected in releases prior to 0.125.0. Upgrade your dependency to 0.125.0 or later.
What CWE is associated with CVE-2025-24015?
CVE-2025-24015 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check crates.io dependencies for CVE-2025-24015?
Run the dependency tree command: 'inspect dependencies for deno'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2x3r-hwv5-p32x",
  "modified" : "2025-06-04T22:56:13Z",
  "published" : "2025-06-04T20:48:56Z",
  "aliases" : [ "CVE-2025-24015" ],
  "summary" : "Deno's AES GCM authentication tags are not verified",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "deno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.46.0"
      }, {
        "fixed" : "2.1.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "deno_node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.102.0"
      }, {
        "fixed" : "0.125.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/security/advisories/GHSA-2x3r-hwv5-p32x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24015"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/commit/0d1beed"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/commit/0d1beed2e3633d71d5e288e0382b85be361ec13d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/commit/4f27d7cdc02e3edfb9d36275341fb8185d6e99ed"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/commit/a4003a5292bd0affefad3ecb24a8732886900f67"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/denoland/deno"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-04T20:48:56Z",
    "nvd_published_at" : "2025-06-03T23:15:20Z"
  }
}