Mend-DemoCorp / JuiceShop

MIT License
0 stars 0 forks source link

socket.io-3.1.2.tgz: 4 vulnerabilities (highest severity is: 7.5) reachable #21

Open mend-for-github-com[bot] opened 1 month ago

mend-for-github-com[bot] commented 1 month ago
Vulnerable Library - socket.io-3.1.2.tgz

node.js realtime framework server

Library home page: https://registry.npmjs.org/socket.io/-/socket.io-3.1.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/socket.io/package.json

Found in HEAD commit: 46f9017bf07d9afe8f4c8706e6bb2bdfc9524486

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (socket.io version) Remediation Possible** Reachability
CVE-2024-37890 High 7.5 ws-7.4.6.tgz Transitive 4.3.0

Reachable

CVE-2023-32695 High 7.3 socket.io-parser-4.0.5.tgz Transitive 4.5.2

Reachable

CVE-2024-38355 High 7.3 socket.io-3.1.2.tgz Direct 4.6.2

Unreachable

CVE-2022-41940 High 7.1 engine.io-4.1.2.tgz Transitive 4.5.0

Unreachable

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

Details

CVE-2024-37890 ### Vulnerable Library - ws-7.4.6.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-7.4.6.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/engine.io/node_modules/ws/package.json,/frontend/node_modules/ws/package.json

Dependency Hierarchy: - socket.io-3.1.2.tgz (Root Library) - engine.io-4.1.2.tgz - :x: **ws-7.4.6.tgz** (Vulnerable Library)

Found in HEAD commit: 46f9017bf07d9afe8f4c8706e6bb2bdfc9524486

Found in base branch: main

### Reachability Analysis This vulnerability is potentially reachable ``` juice-shop-17.0.0/test/api/vulnCodeFixesSpec.ts (Application) -> socket.io-client-3.1.3/build/index.js (Extension) -> socket.io-client-3.1.3/build/manager.js (Extension) -> engine.io-client-4.1.4/lib/transports/index.js (Extension) ... -> engine.io-client-4.1.4/lib/transports/websocket-constructor.js (Extension) -> ws-7.4.6/index.js (Extension) -> ❌ ws-7.4.6/lib/websocket.js (Vulnerable Component) ```

### 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: https://github.com/websockets/ws/security/advisories/GHSA-3h5v-q93c-6h6q

Release Date: 2024-06-17

Fix Resolution (ws): 7.5.10

Direct dependency fix Resolution (socket.io): 4.3.0

In order to enable automatic remediation, please create workflow rules

CVE-2023-32695 ### Vulnerable Library - socket.io-parser-4.0.5.tgz

socket.io protocol parser

Library home page: https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/socket.io-parser/package.json,/frontend/node_modules/socket.io-client/node_modules/socket.io-parser/package.json

Dependency Hierarchy: - socket.io-3.1.2.tgz (Root Library) - :x: **socket.io-parser-4.0.5.tgz** (Vulnerable Library)

Found in HEAD commit: 46f9017bf07d9afe8f4c8706e6bb2bdfc9524486

Found in base branch: main

### Reachability Analysis This vulnerability is potentially reachable ``` juice-shop-17.0.0/test/api/vulnCodeFixesSpec.ts (Application) -> socket.io-client-3.1.3/build/index.js (Extension) -> ❌ socket.io-parser-4.0.5/dist/index.js (Vulnerable Component) ```

### Vulnerability Details

socket.io parser is a socket.io encoder and decoder written in JavaScript complying with version 5 of socket.io-protocol. A specially crafted Socket.IO packet can trigger an uncaught exception on the Socket.IO server, thus killing the Node.js process. A patch has been released in version 4.2.3.

Publish Date: 2023-05-27

URL: CVE-2023-32695

### CVSS 3 Score Details (7.3)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - 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

Origin: https://github.com/socketio/socket.io-parser/security/advisories/GHSA-cqmj-92xf-r6r9

Release Date: 2023-05-27

Fix Resolution (socket.io-parser): 4.2.3

Direct dependency fix Resolution (socket.io): 4.5.2

In order to enable automatic remediation, please create workflow rules

CVE-2024-38355 ### Vulnerable Library - socket.io-3.1.2.tgz

node.js realtime framework server

Library home page: https://registry.npmjs.org/socket.io/-/socket.io-3.1.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/socket.io/package.json

Dependency Hierarchy: - :x: **socket.io-3.1.2.tgz** (Vulnerable Library)

Found in HEAD commit: 46f9017bf07d9afe8f4c8706e6bb2bdfc9524486

Found in base branch: main

### Reachability Analysis

The vulnerable code is unreachable

### Vulnerability Details

Socket.IO is an open source, real-time, bidirectional, event-based, communication framework. A specially crafted Socket.IO packet can trigger an uncaught exception on the Socket.IO server, thus killing the Node.js process. This issue is fixed by commit `15af22fc22` which has been included in `socket.io@4.6.2` (released in May 2023). The fix was backported in the 2.x branch as well with commit `d30630ba10`. Users are advised to upgrade. Users unable to upgrade may attach a listener for the "error" event to catch these errors.

Publish Date: 2024-06-19

URL: CVE-2024-38355

### CVSS 3 Score Details (7.3)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - 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

Origin: https://github.com/socketio/socket.io/security/advisories/GHSA-25hc-qcg6-38wj

Release Date: 2024-06-19

Fix Resolution: 4.6.2

In order to enable automatic remediation, please create workflow rules

CVE-2022-41940 ### Vulnerable Library - engine.io-4.1.2.tgz

The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server

Library home page: https://registry.npmjs.org/engine.io/-/engine.io-4.1.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/engine.io/package.json

Dependency Hierarchy: - socket.io-3.1.2.tgz (Root Library) - :x: **engine.io-4.1.2.tgz** (Vulnerable Library)

Found in HEAD commit: 46f9017bf07d9afe8f4c8706e6bb2bdfc9524486

Found in base branch: main

### Reachability Analysis

The vulnerable code is unreachable

### Vulnerability Details

Engine.IO is the implementation of transport-based cross-browser/cross-device bi-directional communication layer for Socket.IO. A specially crafted HTTP request can trigger an uncaught exception on the Engine.IO server, thus killing the Node.js process. This impacts all the users of the engine.io package, including those who uses depending packages like socket.io. There is no known workaround except upgrading to a safe version. There are patches for this issue released in versions 3.6.1 and 6.2.1.

Publish Date: 2022-11-22

URL: CVE-2022-41940

### CVSS 3 Score Details (7.1)

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

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://github.com/socketio/engine.io/security/advisories/GHSA-r7qp-cfhv-p84w

Release Date: 2022-11-22

Fix Resolution (engine.io): 6.2.1

Direct dependency fix Resolution (socket.io): 4.5.0

In order to enable automatic remediation, please create workflow rules


In order to enable automatic remediation for this issue, please create workflow rules

mend-for-github-com[bot] commented 1 month ago

:heavy_check_mark: This issue was automatically closed by Mend because the vulnerable library in the specific branch(es) was either marked as ignored or it is no longer part of the Mend inventory.

mend-for-github-com[bot] commented 1 month ago

:information_source: This issue was automatically re-opened by Mend because the vulnerable library in the specific branch(es) has been detected in the Mend inventory.