CVE-2021-43307
JavaScript vulnerability analysis and mitigation

Overview

An exponential ReDoS (Regular Expression Denial of Service) vulnerability was discovered in the semver-regex npm package, identified as CVE-2021-43307. The vulnerability was discovered by Denys Vozniuk of the JFrog Security Research Team and was published on May 30, 2022. The vulnerability affects semver-regex versions up to 3.1.3 and versions 4.0.0 through 4.0.2 (JFrog Research).

Technical details

The vulnerability occurs when an attacker can supply arbitrary input to the test() method of the semver-regex package. The issue is classified as a Regular Expression Denial of Service (ReDoS) with a CVSS v3.1 score of 7.5 (HIGH) and CVSS v2.0 score of 5.0 (MEDIUM). A proof of concept for triggering the vulnerability involves using the pattern '0.0.1-' + '-.--'.repeat(i) + ' ' (JFrog Research, NVD).

Impact

When successfully exploited, this vulnerability can lead to a denial of service condition through CPU consumption caused by the exponential regular expression processing. This can potentially affect the availability of services using the vulnerable package (NVD).

Mitigation and workarounds

The vulnerability has been fixed in versions 3.1.4 and 4.0.3 of the semver-regex package. Users should upgrade to these or later versions to mitigate the vulnerability. No alternative mitigations are provided for this issue (JFrog Research).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23744CRITICAL9.8
  • JavaScriptJavaScript
  • @mcpjam/inspector
NoYesJan 16, 2026
CVE-2026-23735HIGH8.7
  • JavaScriptJavaScript
  • graphql-modules
NoYesJan 16, 2026
GHSA-gw32-9rmw-qwwwHIGH8.4
  • JavaScriptJavaScript
  • svelte
NoYesJan 16, 2026
CVE-2026-23745HIGH8.2
  • JavaScriptJavaScript
  • nodejs-full-i18n
NoYesJan 16, 2026
GHSA-38cw-85xc-xr9xMEDIUM6.8
  • JavaScriptJavaScript
  • @veramo/data-store
NoYesJan 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management