turkdevops / sourcegraph

Universal code search (self-hosted)
https://sourcegraph.com
Other
1 stars 0 forks source link

sanitize-html-2.3.2.tgz: 2 vulnerabilities (highest severity is: 7.5) #383

Open mend-bolt-for-github[bot] opened 2 years ago

mend-bolt-for-github[bot] commented 2 years ago
Vulnerable Library - sanitize-html-2.3.2.tgz

Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis

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

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (sanitize-html version) Remediation Possible**
CVE-2022-25887 High 7.5 sanitize-html-2.3.2.tgz Direct 2.7.1
CVE-2021-23566 Medium 5.5 nanoid-3.1.23.tgz Transitive 2.3.3

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

Details

CVE-2022-25887 ### Vulnerable Library - sanitize-html-2.3.2.tgz

Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis

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

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy: - :x: **sanitize-html-2.3.2.tgz** (Vulnerable Library)

Found in base branch: add-event-tracking

### Vulnerability Details

The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.

Publish Date: 2022-08-30

URL: CVE-2022-25887

### 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://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-25887

Release Date: 2022-08-30

Fix Resolution: 2.7.1

Step up your Open Source Security Game with Mend [here](https://www.whitesourcesoftware.com/full_solution_bolt_github)
CVE-2021-23566 ### Vulnerable Library - nanoid-3.1.23.tgz

A tiny (108 bytes), secure URL-friendly unique string ID generator

Library home page: https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy: - sanitize-html-2.3.2.tgz (Root Library) - postcss-8.3.5.tgz - :x: **nanoid-3.1.23.tgz** (Vulnerable Library)

Found in base branch: add-event-tracking

### Vulnerability Details

The package nanoid from 3.0.0 and before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.

Publish Date: 2022-01-14

URL: CVE-2021-23566

### CVSS 3 Score Details (5.5)

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

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Release Date: 2022-01-14

Fix Resolution (nanoid): 3.1.31

Direct dependency fix Resolution (sanitize-html): 2.3.3

Step up your Open Source Security Game with Mend [here](https://www.whitesourcesoftware.com/full_solution_bolt_github)