Skip to content
Heist/ feed
Back to feed
Critical

Arbitrary Code Execution

Type: advisorySources: OSV

The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the WeakMap.prototype.set method. Exploiting this vulnerability leads to access to a host object and a sandbox compromise.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-25893
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 02:06 UTC · Revision 1

Source evidence

Arbitrary Code Execution

core-osv · Original source

Published 21 Dec 2022, 05:15 UTC

The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the WeakMap.prototype.set method. Exploiting this vulnerability leads to access to a host object and a sandbox compromise.

osv:CVE-2022-25893
Complete source record
{
  "id": "412395e752de8257e3532761062293dc31bffe3a8ec71274f876eab505395c53",
  "url": "https://osv.dev/vulnerability/CVE-2022-25893",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Arbitrary Code Execution",
    "summary": "The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the WeakMap.prototype.set method. Exploiting this vulnerability leads to access to a host object and a sandbox compromise.",
    "evidence": "osv:CVE-2022-25893",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2022-25893",
      "aliases": [
        "CVE-2022-25893",
        "GHSA-4w2j-2rg4-5mjw"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/patriksimek/vm2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6fcb7079c2a7673f3682f590df07417b1f4991fe"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.9.10"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "SplitRange"
                  },
                  {
                    "cpe": "cpe:2.3:a:vm2_project:vm2:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.9.10"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.9.9",
            "3.9.8",
            "3.9.7",
            "3.9.6",
            "3.9.5",
            "3.9.4",
            "3.9.3",
            "v3.9.2",
            "v3.9.1",
            "v3.9.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-25893.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.137800805Z",
      "provider": "osv",
      "references": [
        "https://github.com/patriksimek/vm2/pull/445/commits/3a9876482be487b78a90ac459675da7f83f46d69",
        "https://security.snyk.io/vuln/SNYK-JS-VM2-2990237",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25893.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-25893",
        "https://github.com/patriksimek/vm2/issues/444",
        "https://github.com/patriksimek/vm2/pull/445"
      ],
      "provider_metadata": {
        "cna_assigner": "snyk",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25893.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-25893",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514129,
  "published_at": "2022-12-21T05:15:11.22+00:00"
}