Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocha-6.0.0.tgz: 12 vulnerabilities (highest severity is: 9.8) #8

Open
mend-for-github-com bot opened this issue Aug 17, 2022 · 0 comments
Open
Labels
Mend: dependency security vulnerability Security vulnerability detected by Mend

Comments

@mend-for-github-com
Copy link

mend-for-github-com bot commented Aug 17, 2022

Vulnerable Library - mocha-6.0.0.tgz

simple, flexible, fun test framework

Library home page: https://registry.npmjs.org/mocha/-/mocha-6.0.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/package.json

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (mocha version) Remediation Possible**
CVE-2021-44906 Critical 9.8 minimist-0.0.8.tgz Transitive 6.2.3
WS-2019-0063 High 8.1 js-yaml-3.12.0.tgz Transitive 6.1.4
WS-2021-0638 High 7.5 mocha-6.0.0.tgz Direct 10.1.0
WS-2019-0032 High 7.5 js-yaml-3.12.0.tgz Transitive 6.1.0
CVE-2024-4068 High 7.5 braces-2.3.2.tgz Transitive N/A*
CVE-2024-21538 High 7.5 cross-spawn-6.0.5.tgz Transitive N/A*
CVE-2022-38900 High 7.5 decode-uri-component-0.2.0.tgz Transitive 6.0.1
CVE-2020-7598 Medium 5.6 minimist-0.0.8.tgz Transitive 6.2.3
CVE-2024-4067 Medium 5.3 micromatch-3.1.10.tgz Transitive 6.1.0
CVE-2022-25883 Medium 5.3 semver-5.7.1.tgz Transitive 8.0.0
CVE-2020-7608 Medium 5.3 yargs-parser-11.1.1.tgz Transitive 6.2.3
CVE-2017-16137 Low 3.7 debug-3.2.6.tgz Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the "Details" section below to see if there is a version of transitive dependency where vulnerability is fixed.

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2021-44906

Vulnerable Library - minimist-0.0.8.tgz

parse argument options

Library home page: https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/node_modules/minimist/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • mkdirp-0.5.1.tgz
      • minimist-0.0.8.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Minimist <=1.2.5 is vulnerable to Prototype Pollution via file index.js, function setKey() (lines 69-95).

Publish Date: 2022-03-17

URL: CVE-2021-44906

CVSS 3 Score Details (9.8)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: High
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-xvch-5gv4-984h

Release Date: 2022-03-17

Fix Resolution (minimist): 0.2.4

Direct dependency fix Resolution (mocha): 6.2.3

⛑️ Automatic Remediation will be attempted for this issue.

WS-2019-0063

Vulnerable Library - js-yaml-3.12.0.tgz

YAML 1.2 parser and serializer

Library home page: https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/node_modules/js-yaml/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • js-yaml-3.12.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Js-yaml prior to 3.13.1 are vulnerable to Code Injection. The load() function may execute arbitrary code injected through a malicious YAML file.

Publish Date: 2019-04-05

URL: WS-2019-0063

CVSS 3 Score Details (8.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: High
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.npmjs.com/advisories/813

Release Date: 2019-04-05

Fix Resolution (js-yaml): 3.13.1

Direct dependency fix Resolution (mocha): 6.1.4

⛑️ Automatic Remediation will be attempted for this issue.

WS-2021-0638

Vulnerable Library - mocha-6.0.0.tgz

simple, flexible, fun test framework

Library home page: https://registry.npmjs.org/mocha/-/mocha-6.0.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

There is regular Expression Denial of Service (ReDoS) vulnerability in mocha.
It allows cause a denial of service when stripping crafted invalid function definition from strs.

Publish Date: 2021-09-18

URL: WS-2021-0638

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2021-09-18

Fix Resolution: 10.1.0

⛑️ Automatic Remediation will be attempted for this issue.

WS-2019-0032

Vulnerable Library - js-yaml-3.12.0.tgz

YAML 1.2 parser and serializer

Library home page: https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/node_modules/js-yaml/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • js-yaml-3.12.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Versions js-yaml prior to 3.13.0 are vulnerable to Denial of Service. By parsing a carefully-crafted YAML file, the node process stalls and may exhaust system resources leading to a Denial of Service.

Publish Date: 2019-03-20

URL: WS-2019-0032

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.npmjs.com/advisories/788/versions

Release Date: 2019-03-20

Fix Resolution (js-yaml): 3.13.0

Direct dependency fix Resolution (mocha): 6.1.0

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2024-4068

Vulnerable Library - braces-2.3.2.tgz

Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.

Library home page: https://registry.npmjs.org/braces/-/braces-2.3.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/braces/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • findup-sync-2.0.0.tgz
      • micromatch-3.1.10.tgz
        • braces-2.3.2.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

The NPM package braces, versions prior to 3.0.3, fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js, if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.
Mend Note: After conducting a further research, it was concluded that CVE-2024-4068 does not contain a high security risk that reflects the NVD score, but should be kept for users' awareness. Users of braces should follow the fix recommendation as noted.

Publish Date: 2024-05-13

URL: CVE-2024-4068

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2024-05-13

Fix Resolution: braces - 3.0.3

CVE-2024-21538

Vulnerable Library - cross-spawn-6.0.5.tgz

Cross platform child_process#spawn and child_process#spawnSync

Library home page: https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/cross-spawn/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • yargs-12.0.5.tgz
      • os-locale-3.1.0.tgz
        • execa-1.0.0.tgz
          • cross-spawn-6.0.5.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Versions of the package cross-spawn before 7.0.5 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by crafting a very large and well crafted string.

Publish Date: 2024-11-08

URL: CVE-2024-21538

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2024-21538

Release Date: 2024-11-08

Fix Resolution: cross-spawn - 7.0.5

CVE-2022-38900

Vulnerable Library - decode-uri-component-0.2.0.tgz

A better decodeURIComponent

Library home page: https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/decode-uri-component/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • findup-sync-2.0.0.tgz
      • micromatch-3.1.10.tgz
        • snapdragon-0.8.2.tgz
          • source-map-resolve-0.5.3.tgz
            • decode-uri-component-0.2.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

decode-uri-component 0.2.0 is vulnerable to Improper Input Validation resulting in DoS.

Publish Date: 2022-11-28

URL: CVE-2022-38900

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-w573-4hg7-7wgq

Release Date: 2022-11-28

Fix Resolution (decode-uri-component): 0.2.1

Direct dependency fix Resolution (mocha): 6.0.1

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2020-7598

Vulnerable Library - minimist-0.0.8.tgz

parse argument options

Library home page: https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/node_modules/minimist/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • mkdirp-0.5.1.tgz
      • minimist-0.0.8.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

minimist before 1.2.2 could be tricked into adding or modifying properties of Object.prototype using a "constructor" or "proto" payload.

Publish Date: 2020-03-11

URL: CVE-2020-7598

CVSS 3 Score Details (5.6)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2020-03-11

Fix Resolution (minimist): 0.2.1

Direct dependency fix Resolution (mocha): 6.2.3

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2024-4067

Vulnerable Library - micromatch-3.1.10.tgz

Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.

Library home page: https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/micromatch/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • findup-sync-2.0.0.tgz
      • micromatch-3.1.10.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

The NPM package micromatch prior to 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in micromatch.braces() in index.js because the pattern .* will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persists. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching. This issue was fixed in version 4.0.8.
Mend Note: After conducting a further research, it was concluded that CVE-2024-4067 should not reflect the security risk score in NVD, but will be kept for users' awareness.

Publish Date: 2024-05-13

URL: CVE-2024-4067

CVSS 3 Score Details (5.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2024-05-13

Fix Resolution (micromatch): 4.0.8

Direct dependency fix Resolution (mocha): 6.1.0

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2022-25883

Vulnerable Library - semver-5.7.1.tgz

The semantic version parser used by npm.

Library home page: https://registry.npmjs.org/semver/-/semver-5.7.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/cross-spawn/node_modules/semver/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • yargs-12.0.5.tgz
      • os-locale-3.1.0.tgz
        • execa-1.0.0.tgz
          • cross-spawn-6.0.5.tgz
            • semver-5.7.1.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Versions of the package semver before 7.5.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.

Publish Date: 2023-06-21

URL: CVE-2022-25883

CVSS 3 Score Details (5.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-c2qf-rxjj-qqgw

Release Date: 2023-06-21

Fix Resolution (semver): 5.7.2

Direct dependency fix Resolution (mocha): 8.0.0

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2020-7608

Vulnerable Library - yargs-parser-11.1.1.tgz

the mighty option parser used by yargs

Library home page: https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/yargs-parser/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • yargs-parser-11.1.1.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

yargs-parser could be tricked into adding or modifying properties of Object.prototype using a "proto" payload.

Publish Date: 2020-03-16

URL: CVE-2020-7608

CVSS 3 Score Details (5.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Local
    • Attack Complexity: Low
    • Privileges Required: Low
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2020-03-16

Fix Resolution (yargs-parser): 13.1.2

Direct dependency fix Resolution (mocha): 6.2.3

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2017-16137

Vulnerable Library - debug-3.2.6.tgz

small debugging utility

Library home page: https://registry.npmjs.org/debug/-/debug-3.2.6.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/mocha/node_modules/debug/package.json

Dependency Hierarchy:

  • mocha-6.0.0.tgz (Root Library)
    • debug-3.2.6.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

The debug module is vulnerable to regular expression denial of service when untrusted user input is passed into the o formatter. It takes around 50k characters to block for 2 seconds making this a low severity issue.

Publish Date: 2018-06-07

URL: CVE-2017-16137

CVSS 3 Score Details (3.7)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-16137

Release Date: 2018-04-26

Fix Resolution: 2.6.9


⛑️Automatic Remediation will be attempted for this issue.

@mend-for-github-com mend-for-github-com bot added the Mend: dependency security vulnerability Security vulnerability detected by Mend label Aug 17, 2022
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 5 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 6 vulnerabilities (highest severity is: 9.8) Sep 5, 2022
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 6 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 7 vulnerabilities (highest severity is: 9.8) Nov 30, 2022
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 7 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 8 vulnerabilities (highest severity is: 9.8) Dec 27, 2022
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 8 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 7 vulnerabilities (highest severity is: 9.8) Jan 6, 2023
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 7 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 8 vulnerabilities (highest severity is: 9.8) Feb 21, 2023
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 8 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 7 vulnerabilities (highest severity is: 9.8) Mar 29, 2023
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 7 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 8 vulnerabilities (highest severity is: 9.8) Jun 21, 2023
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 8 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 9 vulnerabilities (highest severity is: 9.8) Feb 28, 2024
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 9 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 11 vulnerabilities (highest severity is: 9.8) May 14, 2024
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 11 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 12 vulnerabilities (highest severity is: 9.8) Nov 11, 2024
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 12 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 10 vulnerabilities (highest severity is: 9.8) Jan 19, 2025
@mend-for-github-com mend-for-github-com bot changed the title mocha-6.0.0.tgz: 10 vulnerabilities (highest severity is: 9.8) mocha-6.0.0.tgz: 12 vulnerabilities (highest severity is: 9.8) Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: dependency security vulnerability Security vulnerability detected by Mend
Projects
None yet
Development

No branches or pull requests

0 participants