GHSA-22rr-f3p8-5gf8: Directus Directus Affected By VM2 Sandbox Vulnerability

HIGH
CVSS 7.6
Published
Advisory Summary

GHSA-22rr-f3p8-5gf8 is a HIGH (CVSS 7.6) directus affected by vm2 sandbox vulnerability (General Security Weakness) affecting Directus libraries in the npm ecosystem. The issue involves directus affected by vm2 sandbox escape vulnerability. Remediation is available by upgrading affected packages to version 10.6.0.

GHSA-22rr-f3p8-5gf8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-22rr-f3p8-5gf8
Severity HIGH
CVSS v3.1 Base Score 7.6
CWE Classification General Security Weakness
Affected Product Directus
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H).

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

How to Fix GHSA-22rr-f3p8-5gf8

To remediate this vulnerability, upgrade all affected Directus dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

directus fixed: 10.6.0
npm install directus@10.6.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls directus

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-22rr-f3p8-5gf8, inspect your project dependencies using npm:

npm ls directus

Analyze the terminal output to locate any version of Directus in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.6.0), your application is affected.

Note: The npm ls directus command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Directus, 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 In vm2 for versions up to 3.9.19, Promise handler sanitization can be bypassed, allowing attackers to escape the sandbox and run arbitrary code. Within Directus this applies to the "Run Script" operation in flows being able to escape the sandbox running code in the main nodejs context. ### Patches Patched in v10.6.0 by replacing `vm2` with `isolated-vm` ### Workarounds None ### References https://github.com/patriksimek/vm2/security/advisories/GHSA-cchq-frgv-rjh5

GHSA-22rr-f3p8-5gf8 Affected Directus Versions

1 component(s)
Fixed Versions:
10.6.0
Product / Package Ecosystem Affected Versions Fixed Version
directus
npm
< 10.6.0
10.6.0

References

Frequently Asked Questions

What is GHSA-22rr-f3p8-5gf8?
GHSA-22rr-f3p8-5gf8 is a security vulnerability in Directus involving Directus affected by VM2 sandbox escape vulnerability under General Security Weakness.
Which Directus versions are affected?
Affected versions include releases prior to 10.6.0 across affected packages: directus.
What version fixes GHSA-22rr-f3p8-5gf8?
Upgrading to 10.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is directus affected?
Yes, directus is affected in releases prior to 10.6.0. Upgrade your dependency to 10.6.0 or later.
What is the CVSS score of GHSA-22rr-f3p8-5gf8?
GHSA-22rr-f3p8-5gf8 has a CVSS v3.1 base score of 7.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with GHSA-22rr-f3p8-5gf8?
GHSA-22rr-f3p8-5gf8 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-22rr-f3p8-5gf8?
Run the dependency tree command: 'npm ls directus'. 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-22rr-f3p8-5gf8",
  "modified" : "2023-09-15T17:12:42Z",
  "published" : "2023-09-15T17:12:42Z",
  "aliases" : [ ],
  "summary" : "Directus affected by VM2 sandbox escape vulnerability",
  "details" : "### Impact\nIn vm2 for versions up to 3.9.19, Promise handler sanitization can be bypassed, allowing attackers to escape the sandbox and run arbitrary code. Within Directus this applies to the \"Run Script\" operation in flows being able to escape the sandbox running code in the main nodejs context.\n\n### Patches\nPatched in v10.6.0 by replacing `vm2` with `isolated-vm`\n\n### Workarounds\nNone\n\n### References\nhttps://github.com/patriksimek/vm2/security/advisories/GHSA-cchq-frgv-rjh5",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "directus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/directus/directus/security/advisories/GHSA-22rr-f3p8-5gf8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/patriksimek/vm2/security/advisories/GHSA-cchq-frgv-rjh5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/directus/directus/pull/19332"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/directus/directus/commit/284156426fa94f688e8d65a7a4f34f9e6705f058"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/directus/directus"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-15T17:12:42Z",
    "nvd_published_at" : null
  }
}