Vulnerabilities in pkg:npm/limdu

PACKAGE
Advisory Identifier: GHSA-77qv-gh6f-pgh4
Advisory Summary

CVE-2020-4066 is a LOW (CVSS 3.8) command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Limdu libraries in the npm ecosystem. The issue involves command injection in limdu. Remediation is available by upgrading affected packages to version 0.9.5.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/limdu

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-77qv-gh6f-pgh4 CVE-2020-4066 LOW Command Injection in Limdu

CVE-2020-4066 at a Glance

CVE Identifier CVE-2020-4066
GHSA Identifier GHSA-77qv-gh6f-pgh4
Severity LOW
CVSS v3.1 Base Score 3.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Limdu
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.8

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

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

How to Fix CVE-2020-4066

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

limdu fixed: 0.9.5
npm install limdu@0.9.5
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 limdu

How to Check if You Are Affected

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

npm ls limdu

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

Note: The npm ls limdu 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Limdu, 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 The `trainBatch` function has a command injection vulnerability. Clients of the Limdu library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability. ### Patches Patched in version 0.9.5. ### Workarounds Do not use trainBatch with classifiers that rely on shell execution, such as SVM Perf, SVM Linear or Adaboost ### References No

CVE-2020-4066 Affected Limdu Versions

1 component(s)
Fixed Versions:
0.9.5
Product / Package Ecosystem Affected Versions Fixed Version
limdu
npm
< 0.9.5
0.9.5

References

Frequently Asked Questions

What is CVE-2020-4066?
CVE-2020-4066 is a security vulnerability in Limdu involving Command Injection in Limdu under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Limdu versions are affected?
Affected versions include releases prior to 0.9.5 across affected packages: limdu.
What version fixes CVE-2020-4066?
Upgrading to 0.9.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is limdu affected?
Yes, limdu is affected in releases prior to 0.9.5. Upgrade your dependency to 0.9.5 or later.
What is the CVSS score of CVE-2020-4066?
CVE-2020-4066 has a CVSS v3.1 base score of 3.8 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2020-4066?
CVE-2020-4066 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2020-4066?
Run the dependency tree command: 'npm ls limdu'. 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-77qv-gh6f-pgh4",
  "modified" : "2023-03-31T18:27:07Z",
  "published" : "2020-06-22T15:24:06Z",
  "aliases" : [ "CVE-2020-4066" ],
  "summary" : "Command Injection in Limdu",
  "details" : "### Impact\nThe `trainBatch` function has a command injection vulnerability. Clients of the Limdu library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability.\n\n### Patches\nPatched in version 0.9.5.\n\n### Workarounds\nDo not use trainBatch with classifiers that rely on shell execution, such as SVM Perf, SVM Linear or Adaboost\n\n### References\nNo",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "limdu"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.9.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/erelsgl/limdu/security/advisories/GHSA-77qv-gh6f-pgh4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-4066"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/erelsgl/limdu/commit/03475a6a6bb253de6fad8f7f39cfb3504f11438d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/erelsgl/limdu"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-17T20:12:44Z",
    "nvd_published_at" : null
  }
}