Lucene search

K
githubGitHub Advisory DatabaseGHSA-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
CWE-362
GitHub Advisory Database
github.com
17
deno
race condition
permission prompt
interactive
spoofing
vulnerability.

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

52.3%

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.

Affected configurations

Vulners
Node
denodenoRange<1.29.3
CPENameOperatorVersion
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

52.3%

Related for GHSA-MC52-JPM2-CQH6