CVE-2025-21620 Deno's authorization headers not dropped when redirecting cross-origin
Deno leaks Authorization headers to cross-origin domains during redirects, exposing sensitive credentials to unintended recipients.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-21620?
CVE-2025-21620 is a high-severity vulnerability in denoland deno, published on 6 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Deno is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults. When you send a request with the Authorization header to one domain, and the response asks to redirect to a different domain, Deno'sfetch() redirect handling creates a follow-up redirect request that keeps the original Authorization header, leaking its content to that second domain. This vulnerability is fixed in 2.1.2.
Weakness: CWE-200
Which versions are affected by CVE-2025-21620?
6 open source packages ship an affected version, including deno and deno_fetch.
| Package | Affected | Fixed in |
|---|---|---|
deno crates.io | All versions to 1.46.3 | None |
deno crates.io | All versions to 1.46.3 | None |
deno crates.io | From 2.0.0 | 2.1.2 |
deno crates.io | From 2.0.0 | 2.1.2 |
deno_fetch crates.io | From 0.0.1 | 0.204.0 |
deno_fetch crates.io | From 0.0.1 | 0.204.0 |
How do I fix CVE-2025-21620?
Upgrade deno to 2.1.2 or later.
Is CVE-2025-21620 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-21620 exists.
Sources
Also known as GHSA-f27p-cmv8-xhm6.