Vulnerabilities in pkg:npm/@sideway/formula

PACKAGE
Advisory Identifier: GHSA-c2jc-4fpr-4vhg
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@sideway/formula

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@sideway/formula. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c2jc-4fpr-4vhg CVE-2023-25166 MODERATE @sideway/formula contains Regular Expression Denial of Service (ReDoS) Vulnerability

CVE-2023-25166 at a Glance

CVE Identifier CVE-2023-25166
GHSA Identifier GHSA-c2jc-4fpr-4vhg
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product @sideway/formula
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

@sideway/formula fixed: 3.0.1
npm install @sideway/formula@3.0.1
Verify Direct and Transitive Dependencies

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

### Impact User-provided strings to formula's parser might lead to polynomial execution time. ### Patches Users should upgrade to 3.0.1+. ### Workarounds None.

CVE-2023-25166 Affected @sideway/formula Versions

1 component(s)
Fixed Versions:
3.0.1
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?
CVE-2023-25166 is a security vulnerability in @sideway/formula involving @sideway/formula contains Regular Expression Denial of Service (ReDoS) Vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which @sideway/formula versions are affected?
Affected versions include releases prior to 3.0.1 across affected packages: @sideway/formula.
What version fixes CVE-2023-25166?
Upgrading to 3.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sideway/formula affected?
Yes, @sideway/formula is affected in releases prior to 3.0.1. Upgrade your dependency to 3.0.1 or later.
What is the CVSS score of CVE-2023-25166?
CVE-2023-25166 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-25166?
CVE-2023-25166 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2023-25166?
Run the dependency tree command: 'npm ls @sideway/formula'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}