CVEMETERBack to radar
OFFICIAL RECORD · JavaScript packages

CVE-2025-24964

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 9.7 · critical

Remote Code Execution when accessing a malicious website while Vitest API server is listening

Vitest is a testing framework powered by Vite. Affected versions are subject to arbitrary remote Code Execution when accessing a malicious website while Vitest API server is listening by Cross-site WebSocket hijacking (CSWSH) attacks. When `api` option is enabled (Vitest UI enables it), Vitest starts a WebSocket server. This WebSocket server did not check Origin header and did not have any authorization mechanism and was vulnerable to CSWSH attacks. This WebSocket server has `saveTestFile` API that can edit a test file and `rerun` API that can rerun the tests. An attacker can execute arbitrary code by injecting a code in a test file by the `saveTestFile` API and then running that file by calling the `rerun` API. This vulnerability can result in remote code execution for users that are using Vitest serve API. This issue has been patched in versions 1.6.1, 2.1.9 and 3.0.5. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.

Severity and exploitation evidence

EPSS: 0.677% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.

CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:57:41.748Z. Public exploit availability is not used to set this status.

CVSS 3.1 · 9.7 · published by GitHub_M
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Assessment source · checked 2026-11-19T12:57:28.399Z

Verification by field

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T16:57:41.748ZCISA KEV
cvssverified2026-11-19T12:57:28.399ZCVE Program
epssverified2026-11-19T16:04:40.588ZFIRST EPSS
patchesverified2026-11-19T12:52:29.323ZOSV
affectedverified2026-11-19T12:57:28.399ZCVE Program
lifecycleverified2026-11-19T12:57:28.399ZCVE Program

Affected versions and configuration

vitest-dev vitest; default status: unknown: <= 0.0.125 [affected; scheme: unspecified]; >= 1.0.0, < 1.6.1 [affected; scheme: unspecified]; >= 2.0.0, < 2.1.9 [affected; scheme: unspecified]; >= 3.0.0, < 3.0.5 [affected; scheme: unspecified]

Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.

CVE Program · cve-json · full conditions
{
  "affected": [
    {
      "vendor": "vitest-dev",
      "product": "vitest",
      "versions": [
        {
          "status": "affected",
          "version": "<= 0.0.125"
        },
        {
          "status": "affected",
          "version": ">= 1.0.0, < 1.6.1"
        },
        {
          "status": "affected",
          "version": ">= 2.0.0, < 2.1.9"
        },
        {
          "status": "affected",
          "version": ">= 3.0.0, < 3.0.5"
        }
      ]
    }
  ],
  "additionalContainers": [
    {
      "title": "CISA ADP Vulnrichment",
      "metrics": [
        {
          "other": {
            "type": "ssvc",
            "content": {
              "id": "CVE-2025-24964",
              "role": "CISA Coordinator",
              "options": [
                {
                  "Exploitation": "poc"
                },
                {
                  "Automatable": "no"
                },
                {
                  "Technical Impact": "total"
                }
              ],
              "version": "2.0.3",
              "timestamp": "2025-02-04T19:45:47.197801Z"
            }
          }
        }
      ],
      "providerMetadata": {
        "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "shortName": "CISA-ADP",
        "dateUpdated": "2025-02-12T20:51:28.286Z"
      }
    }
  ]
}
Archived source JSON
OSV · osv · full conditions
{
  "id": "GHSA-9crc-q9x8-hgqq",
  "aliases": [
    "CVE-2025-24964"
  ],
  "affected": [
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "1.0.0"
            },
            {
              "fixed": "1.6.1"
            }
          ]
        }
      ],
      "package": {
        "name": "vitest",
        "purl": "pkg:npm/vitest",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/02/GHSA-9crc-q9x8-hgqq/GHSA-9crc-q9x8-hgqq.json"
      }
    },
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "2.0.0"
            },
            {
              "fixed": "2.1.9"
            }
          ]
        }
      ],
      "package": {
        "name": "vitest",
        "purl": "pkg:npm/vitest",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/02/GHSA-9crc-q9x8-hgqq/GHSA-9crc-q9x8-hgqq.json"
      }
    },
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "3.0.0"
            },
            {
              "fixed": "3.0.5"
            }
          ]
        }
      ],
      "package": {
        "name": "vitest",
        "purl": "pkg:npm/vitest",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/02/GHSA-9crc-q9x8-hgqq/GHSA-9crc-q9x8-hgqq.json"
      }
    },
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "0.0.125"
            }
          ]
        }
      ],
      "package": {
        "name": "vitest",
        "purl": "pkg:npm/vitest",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/02/GHSA-9crc-q9x8-hgqq/GHSA-9crc-q9x8-hgqq.json"
      }
    }
  ],
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
    }
  ],
  "upstream": [],
  "withdrawn": null,
  "references": [
    {
      "url": "https://github.com/vitest-dev/vitest/security/advisories/GHSA-9crc-q9x8-hgqq",
      "type": "WEB"
    },
    {
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-24964",
      "type": "ADVISORY"
    },
    {
      "url": "https://github.com/vitest-dev/vitest/commit/191ef9e34c867d0efd04f49b3d38193a68e825dc",
      "type": "WEB"
    },
    {
      "url": "https://github.com/vitest-dev/vitest/commit/7ce9fbb4972d45c6fd34c843645ef6f549bbb241",
      "type": "WEB"
    },
    {
      "url": "https://github.com/vitest-dev/vitest/commit/e0fe1d81e2d4bcddb1c6ca3c5c3970d8ba697383",
      "type": "WEB"
    },
    {
      "url": "https://github.com/vitest-dev/vitest",
      "type": "PACKAGE"
    },
    {
      "url": "https://github.com/vitest-dev/vitest/blob/9a581e1c43e5c02b11e2a8026a55ce6a8cb35114/packages/vitest/src/api/setup.ts#L32-L46",
      "type": "WEB"
    },
    {
      "url": "https://github.com/vitest-dev/vitest/blob/9a581e1c43e5c02b11e2a8026a55ce6a8cb35114/packages/vitest/src/api/setup.ts#L66-L76",
      "type": "WEB"
    },
    {
      "url": "https://vitest.dev/config/#api",
      "type": "WEB"
    }
  ],
  "relatedGitRanges": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-1385"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "nvd_published_at": "2025-02-04T20:15:50Z",
    "github_reviewed_at": "2025-02-04T17:00:57Z"
  }
}
Archived source JSON

Correction evidence

Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.

Evidence typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundarynpm / packagevitestNot a distribution channel1.6.1Official record
ecosystem-boundarynpm / packagevitestNot a distribution channel2.1.9Official record
ecosystem-boundarynpm / packagevitestNot a distribution channel3.0.5Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history