CVE-2023-25166: @sideway/formula Denial of Service Vulnerability
MODERATECVE-2023-25166 is a MODERATE (CVSS 5.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting @sideway/formula libraries in the npm ecosystem. The issue involves @sideway/formula contains regular expression denial of service (redos) vulnerability. Remediation is available by upgrading affected packages to version 3.0.1.
CVE-2023-25166 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-25166
To remediate this vulnerability, upgrade all affected @sideway/formula 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 @sideway/formula@3.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @sideway/formula
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-25166, inspect your project dependencies using npm:
npm ls @sideway/formula
Analyze the terminal output to locate any version of @sideway/formula in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.1), your application is affected.
Note: The npm ls @sideway/formula 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 @sideway/formula, 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-2023-25166 Affected @sideway/formula Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@sideway/formula
|
npm |
< 3.0.1
|
3.0.1
|
References
Frequently Asked Questions
What is CVE-2023-25166?
Which @sideway/formula versions are affected?
What version fixes CVE-2023-25166?
Is @sideway/formula affected?
What is the CVSS score of CVE-2023-25166?
What CWE is associated with CVE-2023-25166?
How can I check npm dependencies for CVE-2023-25166?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c2jc-4fpr-4vhg",
"modified" : "2023-02-08T22:38:10Z",
"published" : "2023-02-08T22:38:10Z",
"aliases" : [ "CVE-2023-25166" ],
"summary" : "@sideway/formula contains Regular Expression Denial of Service (ReDoS) Vulnerability",
"details" : "### Impact\n\nUser-provided strings to formula's parser might lead to polynomial execution time.\n\n### Patches\n\nUsers should upgrade to 3.0.1+.\n\n### Workarounds\n\nNone.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@sideway/formula"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hapijs/formula/security/advisories/GHSA-c2jc-4fpr-4vhg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25166"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/formula/commit/9fbc20a02d75ae809c37a610a57802cd1b41b3fe"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hapijs/formula"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-08T22:38:10Z",
"nvd_published_at" : "2023-02-08T20:15:00Z"
}
}