Lucene search

K
osvGoogleOSV:GHSA-MC52-JPM2-CQH6
HistoryJan 20, 2023 - 4:56 p.m.

Deno is vulnerable to race condition via interactive permission prompt spoofing

2023-01-2016:56:40
Google
osv.dev
12
deno
race condition
interactive
permission prompt
spoofing
multi-threaded
malicious program
terminal
web worker api
timing sensitive
headless servers
patch
v1.29.3
update
workaround
--no-prompt flag

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

0.002 Low

EPSS

Percentile

53.8%

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.

CPENameOperatorVersion
denoge1.9.0
denolt1.29.3

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

0.002 Low

EPSS

Percentile

53.8%

Related for OSV:GHSA-MC52-JPM2-CQH6