Your RSA-2048 keys break in 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
Nov 8, 2024
Updated
Aug 12, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Sep 21, 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 CVEs57th percentile — riskier than 57% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Real-World Exposure

2 pkgs affected
📦cross-spawn📦cross-spawn

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

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-spawn7.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

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-21538 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2024-21538. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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?

O3 Security finds CVE-2024-21538 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2024-21538: cross-spawn DoS | O3 Security