CVE-2023-22499: Deno Deno Is Vulnerable To Race Vulnerability
HIGHCVE-2023-22499 is a HIGH (CVSS 8.8) deno is vulnerable to race vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Deno libraries in the crates.io ecosystem. The issue involves deno is vulnerable to race condition via interactive permission prompt spoofing. Remediation is available by upgrading affected packages to version 1.29.3.
CVE-2023-22499 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-22499
To remediate this vulnerability, upgrade all affected Deno dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade deno to 1.29.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for deno
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-22499, inspect your project dependencies for Deno:
inspect dependencies for deno
Analyze the terminal output to locate any version of Deno in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.29.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Deno, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-22499 Affected Deno Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
deno
|
crates.io |
≥ 1.9.0
< 1.29.3
|
1.29.3
|
References
Frequently Asked Questions
What is CVE-2023-22499?
Which Deno versions are affected?
What version fixes CVE-2023-22499?
Is deno affected?
What is the CVSS score of CVE-2023-22499?
What CWE is associated with CVE-2023-22499?
How can I check crates.io dependencies for CVE-2023-22499?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mc52-jpm2-cqh6",
"modified" : "2023-04-03T19:15:49Z",
"published" : "2023-01-20T16:56:40Z",
"aliases" : [ "CVE-2023-22499" ],
"summary" : "Deno is vulnerable to race condition via interactive permission prompt spoofing",
"details" : "### Impact\n\nMulti-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. \n\nA malicious program could clear the terminal screen after permission prompt was shown and write a generic message like so:\n```\n// Expected prompt\n⚠️ ┌ Deno requests read access to \"./log.txt\".\n ├ Requested by `Deno.open()` API\n ├ Run again with --allow-read to bypass this prompt.\n └ Allow? [y/n] (y = yes, allow; n = no, deny) >\n\n// Prompt that users would see\nDo you want to continue?\n```\n\nThis 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.\n\nThis problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). \n\n### Patches\n\nThe problem has been fixed in Deno v1.29.3; it is recommended all users update to this version.\n\n### Workarounds\n\nRun with `--no-prompt` flag to disable interactive permission prompts.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "deno"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.9.0"
}, {
"fixed" : "1.29.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/denoland/deno/security/advisories/GHSA-mc52-jpm2-cqh6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22499"
}, {
"type" : "WEB",
"url" : "https://github.com/denoland/deno/pull/17392"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/denoland/deno"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-20T16:56:40Z",
"nvd_published_at" : "2023-01-17T21:15:00Z"
}
}