CVE-2022-24783: Deno Sandbox Bypass Leading To Arbitrary Vulnerability

CRITICAL
Advisory Identifier: GHSA-838h-jqp6-cf2f
CVSS 10.0
CWE-269 CWE-863
Published
Advisory Summary

CVE-2022-24783 is a CRITICAL (CVSS 10.0) sandbox bypass leading to arbitrary vulnerability (CWE-269: Improper Privilege Management) affecting Deno libraries in the crates.io ecosystem. The issue involves sandbox bypass leading to arbitrary code execution in deno. Remediation is available by upgrading affected packages to version 1.20.3.

CVE-2022-24783 at a Glance

CVE Identifier CVE-2022-24783
GHSA Identifier GHSA-838h-jqp6-cf2f
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-269: Improper Privilege Management
Affected Product Deno
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-24783

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.

deno fixed: 1.20.3
Upgrade deno to 1.20.3
Verify Direct and Transitive Dependencies

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-2022-24783, 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.20.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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. 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

### Impact The versions of Deno between release 1.18.0 and 1.20.2 (inclusive) are vulnerable to an attack where a malicious actor controlling the code executed in a Deno runtime could bypass permission checks and execute arbitrary shell code. There is **no** evidence that this vulnerability has been exploited in the wild. This vulnerability does **not** affect users of Deno Deploy. ### Patches The vulnerability has been patched in Deno 1.20.3. ### Workarounds There is no workaround. All users are recommended to upgrade to 1.20.3 immediately --- The cause of this error was that certain FFI operations did not correctly check for permissions. The issue was fixed in [this](https://github.com/denoland/deno/pull/14115) pull request.

CVE-2022-24783 Affected Deno Versions

1 component(s)
Fixed Versions:
1.20.3
Product / Package Ecosystem Affected Versions Fixed Version
deno
crates.io
≥ 1.18.0
< 1.20.3
1.20.3

References

Frequently Asked Questions

What is CVE-2022-24783?
CVE-2022-24783 is a security vulnerability in Deno involving Sandbox bypass leading to arbitrary code execution in Deno under CWE-269: Improper Privilege Management.
Which Deno versions are affected?
Affected versions include releases prior to 1.20.3 across affected packages: deno.
What version fixes CVE-2022-24783?
Upgrading to 1.20.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is deno affected?
Yes, deno is affected in releases prior to 1.20.3. Upgrade your dependency to 1.20.3 or later.
What is the CVSS score of CVE-2022-24783?
CVE-2022-24783 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2022-24783?
CVE-2022-24783 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check crates.io dependencies for CVE-2022-24783?
Run the dependency tree command: 'inspect dependencies for deno'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-838h-jqp6-cf2f",
  "modified" : "2022-05-02T19:39:05Z",
  "published" : "2022-03-29T22:10:10Z",
  "aliases" : [ "CVE-2022-24783" ],
  "summary" : "Sandbox bypass leading to arbitrary code execution in Deno",
  "details" : "### Impact\n\nThe versions of Deno between release 1.18.0 and 1.20.2 (inclusive) are vulnerable to an attack where a malicious actor controlling the code executed in a Deno runtime could bypass permission checks and execute arbitrary shell code.\n\nThere is **no** evidence that this vulnerability has been exploited in the wild.\n\nThis vulnerability does **not** affect users of Deno Deploy.\n\n### Patches\n\nThe vulnerability has been patched in Deno 1.20.3.\n\n### Workarounds\n\nThere is no workaround. All users are recommended to upgrade to 1.20.3 immediately\n\n---\n\nThe cause of this error was that certain FFI operations did not correctly check for permissions. The issue was fixed in [this](https://github.com/denoland/deno/pull/14115) pull request.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "deno"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.18.0"
      }, {
        "fixed" : "1.20.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/security/advisories/GHSA-838h-jqp6-cf2f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24783"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/pull/14115"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/commit/fcfce1bb869fddc629e6d889d6ba1328b80b0dcf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/denoland/deno"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/compare/v1.20.2...v1.20.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/denoland/deno/releases/tag/v1.20.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-863" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-29T22:10:10Z",
    "nvd_published_at" : "2022-03-25T22:15:00Z"
  }
}