CVE-2022-25858
JavaScript vulnerability analysis and mitigation

Overview

The vulnerability CVE-2022-25858 affects the terser package versions before 4.8.1 and from 5.0.0 to before 5.14.2. This security flaw was discovered and disclosed on May 2, 2022, and published on July 14, 2022. The vulnerability is classified as a Regular Expression Denial of Service (ReDoS) issue that stems from insecure usage of regular expressions in the package (NVD, Snyk).

Technical details

The vulnerability is categorized as CWE-1333 (Inefficient Regular Expression Complexity) with varying CVSS scores: NVD rates it as HIGH with a base score of 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), while Snyk assesses it as MEDIUM with a score of 5.3. The vulnerability exists due to the way regular expressions are evaluated in the package, which can lead to catastrophic backtracking. A proof of concept demonstrates that processing certain regex patterns like '/A(B|C+)+D/' against specific input strings can cause exponential processing time (Snyk).

Impact

When exploited, this vulnerability can cause the system to experience significant performance degradation or interruptions in resource availability. While the attacker cannot completely deny service to legitimate users, the affected resources may become partially available or experience reduced performance. The vulnerability does not impact confidentiality or integrity of the system (Snyk).

Mitigation and workarounds

The recommended mitigation is to upgrade the terser package to version 4.8.1 or 5.14.2 or higher, depending on which major version is being used. The vulnerability has been patched in these versions through commits that address the insecure regular expression usage (GitHub Commit, GitHub Commit).

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-2025-67731HIGH8.7
  • JavaScriptJavaScript
  • servify-express
NoYesDec 12, 2025
CVE-2025-67718HIGH8.7
  • JavaScriptJavaScript
  • formio
NoYesDec 11, 2025
CVE-2025-65513HIGH7.5
  • JavaScriptJavaScript
  • mcp-fetch-server
NoNoDec 09, 2025
CVE-2025-67716MEDIUM5.7
  • JavaScriptJavaScript
  • @auth0/nextjs-auth0
NoYesDec 11, 2025
CVE-2025-67490MEDIUM5.4
  • JavaScriptJavaScript
  • @auth0/nextjs-auth0
NoYesDec 10, 2025

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