NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2024-21538 — cross-spawn

Fix: moxystudio/node-cross-spawn@5ff3a07

CVE-2024-21538 is a CWE-1333 vulnerability in cross-spawn. A fix is available for cross-spawn — see the affected versions and patch details below.

Regular Expression Denial of Service (ReDoS) in cross-spawn

Also known asGHSA-3xgq-45jj-v275
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2024-21538.

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs59th percentile — riskier than 59% of all scored CVEsHighest risk
0.00%0.46%0.92%1.37%0.1%0.9%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

12Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
cross-spawnnpm
342.8Mdownloads / week

Description

Versions of the package cross-spawn before 6.0.6, from 7.0.0 and before 7.0.5 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmcross-spawn≥ 7.0.0&&< 7.0.57.0.5npm install cross-spawn@7.0.5
📦npmcross-spawnall versions6.0.6npm install cross-spawn@6.0.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cross-spawn, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update cross-spawn to 7.0.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-21538 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatLow
ProductFixed inAdvisory
Discovery 1 for RHEL 9discovery/discovery-server-rhel9:1.12.0-1RHSA-2025:1249
Red Hat Advanced Cluster Security 4.4advanced-cluster-security/rhacs-main-rhel8:4.4.7-2RHSA-2024:10665
Red Hat Advanced Cluster Security 4.5advanced-cluster-security/rhacs-main-rhel8:4.5.5-3RHSA-2024:10186
Red Hat Developer Hub 1.3 on RHEL 9rhdh/rhdh-hub-rhel9:1.3-131RHBA-2024:10760
Red Hat Migration Toolkit for Containers 1.8rhmtc/openshift-migration-ui-rhel8:v1.8.7-2RHSA-2025:8510
Red Hat OpenShift Container Platform 4.14openshift4/ose-monitoring-plugin-rhel8:v4.14.0-202412040905.p0.g4fa7043.assembly.stream.el8RHSA-2024:11031
Red Hat OpenShift Container Platform 4.15openshift4/ose-monitoring-plugin-rhel8:v4.15.0-202412041605.p0.g1217bc1.assembly.stream.el8RHSA-2024:10839
Red Hat OpenShift Container Platform 4.16openshift4/ose-monitoring-plugin-rhel9:v4.16.0-202412040032.p0.g6cfc2c8.assembly.stream.el9RHSA-2024:10823

Frequently Asked Questions

Versions of the package cross-spawn before 6.0.6, from 7.0.0 and before 7.0.5 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.
O3 Security · Impact-Aware SCA

Is CVE-2024-21538 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2024-21538: cross-spawn DoS — Fixed in 7.0.5