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

jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) #630

Open
mend-for-github-com bot opened this issue Mar 23, 2023 · 2 comments · May be fixed by #1102 or #1094
Open

jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) #630

mend-for-github-com bot opened this issue Mar 23, 2023 · 2 comments · May be fixed by #1102 or #1094
Assignees
Labels
Mend: dependency security vulnerability Security vulnerability detected by Mend

Comments

@mend-for-github-com
Copy link
Contributor

mend-for-github-com bot commented Mar 23, 2023

Vulnerable Library - jest-cli-24.9.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Found in HEAD commit: da8987297d043a87176cf037aa9b64d781bc29c5

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (jest-cli version) Remediation Possible**
CVE-2024-37890 High 7.5 ws-5.2.3.tgz Transitive 25.0.0
CVE-2024-21540 High 7.5 source-map-support-0.5.21.tgz Transitive N/A*
CVE-2023-28155 Medium 6.1 request-2.88.0.tgz Transitive N/A*
CVE-2024-4067 Medium 5.3 micromatch-3.1.10.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-2024-37890

Vulnerable Library - ws-5.2.3.tgz

Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js

Library home page: https://registry.npmjs.org/ws/-/ws-5.2.3.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy:

  • jest-cli-24.9.0.tgz (Root Library)
    • jest-config-24.9.0.tgz
      • jest-environment-jsdom-24.9.0.tgz
        • jsdom-11.12.0.tgz
          • ws-5.2.3.tgz (Vulnerable Library)

Found in HEAD commit: da8987297d043a87176cf037aa9b64d781bc29c5

Found in base branch: main

Vulnerability Details

ws is an open source WebSocket client and server for Node.js. A request with a number of headers exceeding theserver.maxHeadersCount threshold could be used to crash a ws server. The vulnerability was fixed in ws@8.17.1 (e55e510) and backported to ws@7.5.10 (22c2876), ws@6.2.3 (eeb76d3), and ws@5.2.4 (4abd8f6). In vulnerable versions of ws, the issue can be mitigated in the following ways: 1. Reduce the maximum allowed length of the request headers using the --max-http-header-size=size and/or the maxHeaderSize options so that no more headers than the server.maxHeadersCount limit can be sent. 2. Set server.maxHeadersCount to 0 so that no limit is applied.

Publish Date: 2024-06-17

URL: CVE-2024-37890

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-3h5v-q93c-6h6q

Release Date: 2024-06-17

Fix Resolution (ws): 5.2.4

Direct dependency fix Resolution (jest-cli): 25.0.0

⛑️ Automatic Remediation will be attempted for this issue.

CVE-2024-21540

Vulnerable Library - source-map-support-0.5.21.tgz

Fixes stack traces for files with source maps

Library home page: https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy:

  • jest-cli-24.9.0.tgz (Root Library)
    • core-24.9.0.tgz
      • jest-runner-24.9.0.tgz
        • source-map-support-0.5.21.tgz (Vulnerable Library)

Found in HEAD commit: da8987297d043a87176cf037aa9b64d781bc29c5

Found in base branch: main

Vulnerability Details

All versions of the package source-map-support are vulnerable to Directory Traversal in the retrieveSourceMap function.

Publish Date: 2024-11-13

URL: CVE-2024-21540

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: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

CVE-2023-28155

Vulnerable Library - request-2.88.0.tgz

Simplified HTTP request client.

Library home page: https://registry.npmjs.org/request/-/request-2.88.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy:

  • jest-cli-24.9.0.tgz (Root Library)
    • jest-config-24.9.0.tgz
      • jest-environment-jsdom-24.9.0.tgz
        • jsdom-11.12.0.tgz
          • request-2.88.0.tgz (Vulnerable Library)

Found in HEAD commit: da8987297d043a87176cf037aa9b64d781bc29c5

Found in base branch: main

Vulnerability Details

The Request package through 2.88.1 for Node.js allows a bypass of SSRF mitigations via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP). NOTE: This vulnerability only affects products that are no longer supported by the maintainer.

Publish Date: 2023-03-16

URL: CVE-2023-28155

CVSS 3 Score Details (6.1)

Base Score Metrics:

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

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-p8p7-x288-28g6

Release Date: 2023-03-16

Fix Resolution: @cypress/request - 3.0.0

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: /package.json

Dependency Hierarchy:

  • jest-cli-24.9.0.tgz (Root Library)
    • core-24.9.0.tgz
      • micromatch-3.1.10.tgz (Vulnerable Library)

Found in HEAD commit: da8987297d043a87176cf037aa9b64d781bc29c5

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


⛑️Automatic Remediation will be attempted for this issue.

@abbyhu2000
Copy link
Member

abbyhu2000 commented Mar 23, 2023

The Request package (https://github.com/request/request) is deprecated, and there is a fix PR to this issue but it has not been merged: request/request#3444.

However, i think we can request an exemption for this OUI CVE since the affected package that depends on request are all dev dependencies (jest-cli--testing, nodegit--asynchronous native bindings, yo--CLI tool for running Yeoman generators and node-sass), so i do not think it can be exposed by the SSRF vulnerability. @ananzh @joshuarrrr

yarn why request
yarn why v1.22.19
[1/4] Why do we have the module "request"...?
[2/4] Initialising dependency graph...
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "request@2.88.0"
info Reasons this module exists
   - "node-sass" depends on it
   - Hoisted from "node-sass#request"
   - Hoisted from "nodegit#node-gyp#request"
   - Hoisted from "yo#insight#request"
   - Hoisted from "jest-cli#jest-config#jest-environment-jsdom#jsdom#request"
info Disk size without dependencies: "496KB"
info Disk size with unique dependencies: "2.3MB"
info Disk size with transitive dependencies: "10.57MB"
info Number of shared dependencies: 43
Done in 0.86s.

@ananzh
Copy link
Member

ananzh commented Mar 23, 2023

agree. we could keep the issue open and wait for the fix to merge. we could pass to next on-call and keep monitor it until there is a new release.

@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 1 vulnerabilities (highest severity is: 6.1) jest-cli-24.9.0.tgz: 2 vulnerabilities (highest severity is: 6.1) Jun 28, 2023
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 2 vulnerabilities (highest severity is: 6.1) jest-cli-24.9.0.tgz: 1 vulnerabilities (highest severity is: 6.1) Jul 20, 2023
@joshuarrrr joshuarrrr self-assigned this Oct 10, 2023
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 1 vulnerabilities (highest severity is: 6.1) jest-cli-24.9.0.tgz: 2 vulnerabilities (highest severity is: 9.3) Oct 14, 2023
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 2 vulnerabilities (highest severity is: 9.3) jest-cli-24.9.0.tgz: 2 vulnerabilities (highest severity is: 8.8) Oct 27, 2023
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 2 vulnerabilities (highest severity is: 8.8) jest-cli-24.9.0.tgz: 1 vulnerabilities (highest severity is: 6.1) Dec 12, 2023
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 1 vulnerabilities (highest severity is: 6.1) jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) Jul 12, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) Aug 16, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) Aug 16, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) Aug 21, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) Aug 26, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) Sep 4, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) Sep 9, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) Sep 18, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) Oct 2, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) Oct 31, 2024
@mend-for-github-com mend-for-github-com bot changed the title jest-cli-24.9.0.tgz: 3 vulnerabilities (highest severity is: 7.5) jest-cli-24.9.0.tgz: 4 vulnerabilities (highest severity is: 7.5) Nov 13, 2024
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

Successfully merging a pull request may close this issue.

3 participants