CVE-2022-25883 is a medium-severity (CVSS 5.3) CWE-1333 vulnerability in semver. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for semver — see the affected versions and patch details below.
semver vulnerable to Regular Expression Denial of Service
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-2022-25883.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
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.
semvernpmDescription
Versions of the package semver before 7.5.2 on the 7.x branch, before 6.3.1 on the 6.x branch, and all other versions before 5.7.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | semver | ≥ 7.0.0&&< 7.5.2 | 7.5.2npm install semver@7.5.2 |
| 📦npm | semver | ≥ 6.0.0&&< 6.3.1 | 6.3.1npm install semver@6.3.1 |
| 📦npm | semver | ≥ 2.0.0-alpha&&< 5.7.2 | 5.7.2npm install semver@5.7.2 |
Affected Products
semvernpmjsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for semver, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update semver to 7.5.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-25883 is resolved across your whole dependency graph.
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.
This vulnerability is rated Moderate for Red Hat Products versus NVD's High due to deployment context. The flaw in node-semver's new Range() function causes catastrophic regex backtracking on crafted input, leading to CPU exhaustion. However, exploitation requires untrusted input passed directly to the parser. So…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2022-25883 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Migration Toolkit for Runtimes 1 on RHEL 8 | mtr/mtr-web-container-rhel8:1.2-10 | RHSA-2024:0719 |
| multicluster engine for Kubernetes 2.6 for RHEL 8 | multicluster-engine/assisted-image-service-rhel8:v2.6.2-5 | RHSA-2024:5955 |
| NETWORK-OBSERVABILITY-1.4.0-RHEL-9 | network-observability/network-observability-console-plugin-rhel9:v1.4.0-42 | RHSA-2023:5379 |
| Red Hat Advanced Cluster Management for Kubernetes 2.11 for RHEL 9 | rhacm2/acm-cluster-permission-rhel9:v2.11.2-5 | RHSA-2024:6044 |
| Red Hat Enterprise Linux 8 | nodejs:16-8080020230906092006.63b34585 | RHSA-2023:5360 |
| Red Hat Enterprise Linux 8 | nodejs:18-8080020230825111344.63b34585 | RHSA-2023:5362 |
| Red Hat Enterprise Linux 8.6 Extended Update Support | nodejs:16-8060020230906023909.ad008a3a | RHSA-2023:5361 |
| Red Hat Enterprise Linux 9 | nodejs:18-9020020230825081254.rhel9 | RHSA-2023:5363 |
Frequently Asked Questions
Is CVE-2022-25883 in your dependencies?
Find it across npm, including transitive dependencies.