Vulnerabilities in pkg:npm/terminal-kit

PACKAGE
Advisory Identifier: GHSA-wxgh-8gmr-3qh3
Advisory Summary

CVE-2021-4306 is a HIGH (CVSS 7.5) terminal-kit inefficient regular expression complexity vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Terminal kit libraries in the npm ecosystem. The issue involves terminal-kit inefficient regular expression complexity vulnerability. Remediation is available by upgrading affected packages to version 2.1.8.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/terminal-kit

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/terminal-kit. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-wxgh-8gmr-3qh3 CVE-2021-4306 HIGH terminal-kit Inefficient Regular Expression Complexity vulnerability

CVE-2021-4306 at a Glance

CVE Identifier CVE-2021-4306
GHSA Identifier GHSA-wxgh-8gmr-3qh3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Terminal kit
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-4306

To remediate this vulnerability, upgrade all affected Terminal kit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

terminal-kit fixed: 2.1.8
npm install terminal-kit@2.1.8
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 terminal-kit

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-4306, inspect your project dependencies using npm:

npm ls terminal-kit

Analyze the terminal output to locate any version of Terminal kit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.8), your application is affected.

Note: The npm ls terminal-kit 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 Terminal kit, 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

A vulnerability classified as problematic has been found in cronvel terminal-kit up to 2.1.7. Affected is an unknown function. The manipulation leads to inefficient regular expression complexity. Upgrading to version 2.1.8 can address this issue. The name of the patch is a2e446cc3927b559d0281683feb9b821e83b758c. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-217620.

CVE-2021-4306 Affected Terminal kit Versions

1 component(s)
Fixed Versions:
2.1.8
Product / Package Ecosystem Affected Versions Fixed Version
terminal-kit
npm
< 2.1.8
2.1.8

References

Frequently Asked Questions

What is CVE-2021-4306?
CVE-2021-4306 is a security vulnerability in Terminal kit involving terminal-kit Inefficient Regular Expression Complexity vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which Terminal kit versions are affected?
Affected versions include releases prior to 2.1.8 across affected packages: terminal-kit.
What version fixes CVE-2021-4306?
Upgrading to 2.1.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is terminal-kit affected?
Yes, terminal-kit is affected in releases prior to 2.1.8. Upgrade your dependency to 2.1.8 or later.
What is the CVSS score of CVE-2021-4306?
CVE-2021-4306 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-4306?
CVE-2021-4306 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-2021-4306?
Run the dependency tree command: 'npm ls terminal-kit'. 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-wxgh-8gmr-3qh3",
  "modified" : "2023-01-12T23:43:03Z",
  "published" : "2023-01-07T18:30:20Z",
  "aliases" : [ "CVE-2021-4306" ],
  "summary" : "terminal-kit Inefficient Regular Expression Complexity vulnerability",
  "details" : "A vulnerability classified as problematic has been found in cronvel terminal-kit up to 2.1.7. Affected is an unknown function. The manipulation leads to inefficient regular expression complexity. Upgrading to version 2.1.8 can address this issue. The name of the patch is a2e446cc3927b559d0281683feb9b821e83b758c. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-217620.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "terminal-kit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4306"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cronvel/terminal-kit/commit/a2e446cc3927b559d0281683feb9b821e83b758c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cronvel/terminal-kit"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cronvel/terminal-kit/releases/tag/v2.1.8"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.217620"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.217620"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-12T23:43:03Z",
    "nvd_published_at" : "2023-01-07T17:15:00Z"
  }
}