Advisory

GHSA-mc52-jpm2-cqh6

Also known as: CVE-2023-22499

Summary

Deno is vulnerable to race condition via interactive permission prompt spoofing

Details

Impact

Multi-threaded programs were able to spoof interactive permission prompt by rewriting the prompt to suggest that program is waiting on user confirmation to unrelated action.

A malicious program could clear the terminal screen after permission prompt was shown and write a generic message like so:

// Expected prompt
⚠️  ┌ Deno requests read access to "./log.txt".
   ├ Requested by `Deno.open()` API
   ├ Run again with --allow-read to bypass this prompt.
   └ Allow? [y/n] (y = yes, allow; n = no, deny) >

// Prompt that users would see
Do you want to continue?

This situation impacts users who use Web Worker API and relied on interactive permission prompt. The reproduction is very timing sensitive and can’t be reliably reproduced on every try.

This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers).

Patches

The problem has been fixed in Deno v1.29.3; it is recommended all users update to this version.

Workarounds

Run with --no-prompt flag to disable interactive permission prompts.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2023-01-20 16:56 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

deno

crates.io · All systems

Affected

  • introduced 1.9.0, fixed 1.29.3 (semver)

Fixed versions

1.29.3

Fix

  • Fixed version 1.29.3
    cargo update -p deno --precise 1.29.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences