CVE-2025-45143: String math Denial of Service Vulnerability
LOWCVE-2025-45143 is a LOW (CVSS 3.7) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting String math libraries in the npm ecosystem. The issue involves string-math's string-math.js vulnerability can cause regex denial of service (redos). Remediation is available in the latest vendor maintenance releases.
CVE-2025-45143 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2025-45143
To remediate this vulnerability, upgrade all affected String math dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install string-math@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls string-math
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-45143, inspect your project dependencies using npm:
npm ls string-math
Analyze the terminal output to locate any version of String math in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls string-math command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In String math, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-45143 Affected String math Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
string-math
|
npm |
≤ 1.2.2
|
|
References
Frequently Asked Questions
What is CVE-2025-45143?
Which String math versions are affected?
What version fixes CVE-2025-45143?
Is string-math affected?
What is the CVSS score of CVE-2025-45143?
What CWE is associated with CVE-2025-45143?
How can I check npm dependencies for CVE-2025-45143?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-994j-5c83-r424",
"modified" : "2025-06-30T21:39:23Z",
"published" : "2025-06-30T18:31:50Z",
"aliases" : [ "CVE-2025-45143" ],
"summary" : "string-math's string-math.js vulnerability can cause Regex Denial of Service (ReDoS) ",
"details" : "string-math v1.2.2 was discovered to contain a Regex Denial of Service (ReDoS) which is exploited via a crafted input.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "string-math"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.2.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-45143"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/6en6ar/361608bccedb808061359481fe2f1b39"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/devrafalko/string-math"
}, {
"type" : "WEB",
"url" : "https://github.com/devrafalko/string-math/blob/master/string-math.js"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/string-math%2C"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-30T21:39:23Z",
"nvd_published_at" : "2025-06-30T17:15:32Z"
}
}