CVE-2022-25883 semver vulnerable to Regular Expression Denial of Service
An attacker can cause a denial of service by providing untrusted data to the semver library's range function, triggering excessive CPU consumption.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-25883?
CVE-2022-25883 is a medium-severity denial of service vulnerability in semver, published on 21 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Versions of the package semver before 7.5.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.
Weakness: CWE-1333
Which versions are affected by CVE-2022-25883?
6 open source packages ship an affected version, including semver. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
semver npm | From 2.0.0-alpha | 5.7.2 |
semver npm | From 2.0.0-alpha | 5.7.2 |
semver npm | From 6.0.0 | 6.3.1 |
semver npm | From 6.0.0 | 6.3.1 |
semver npm | From 7.0.0 | 7.5.2 |
semver npm | From 7.0.0 | 7.5.2 |
Linux distribution packages (1)
velociraptor openSUSE:Tumbleweed | All versions | 0.7.0.4.git74.3426c0a-9.1 |
Products include Npmjs Semver.
How do I fix CVE-2022-25883?
Upgrade semver to a fixed version for your release line: 5.7.2, 6.3.1 or 7.5.2.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2022-25883 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-25883 exists.
Sources
Also known as AZL-27207, AZL-27208, AZL-43534, AZL-43717, AZL-44694, AZL-45168 and 19 more.