Code Monkey home page Code Monkey logo

react-markdown-heading's Introduction

react-markdown-heading

Render markdown table of contents as React component.

npm version install size minified size minzipped size codecov

Install

npm install react-markdown-heading

How to Use

import React from 'react'
import ReactDOM from 'react-dom'
import ReactMarkdownHeading from 'react-markdown-heading'

const markdown = '## h2\n### h3\n#### h4\n### h3\n# h1\n### h3'

render(
  <ReactMarkdownHeading
    markdown={markdown}
    hyperlink={true}
    onChangeHeading={(headingList) => {
      console.log(headingList)
    }}
    liClassName="li"
    activeAnchorClassName="activeAnchor"
  />,
  document.getElementById('root')
)

screen shot

Option

  • markdown - string, The Markdown source to parse (required)
  • ulClassName - string, Class name of the ul tag (optional)
  • liClassName - string, Class name of the li tag (optional)
  • anchorClassName - string, Class name of the anchor tag (optional)
  • hyperlink - boolean, Add hyperlink to text (default false)
  • blankSpaceReplaceText - string, Replace blank space in hyperlink to this (default -)
  • headingDepth - 1 | 2 | 3 | 4 | 5 | 6, Depth of heading to display (default 6)
  • hyperLinkPrefix - string, Hyperlink prefix (default empty)
  • onChangeHeading - (headingList: HeadingType[]) => void, Change event handler (optional)
  • activeHeading - HeadingType[], Designate active heading list (optional)
  • activeLiClassName - string, Class name of the active li tag (optional)
  • activeAnchorClassName - string, Class name of the active anchor tag (optional)

react-markdown-heading's People

Contributors

kyoncy avatar mend-bolt-for-github[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

anhvietcx

react-markdown-heading's Issues

html-webpack-plugin-5.5.0.tgz: 1 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - html-webpack-plugin-5.5.0.tgz

Path to dependency file: /package.json

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

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (html-webpack-plugin version) Remediation Possible**
CVE-2022-25858 High 7.5 terser-5.10.0.tgz Transitive 5.5.1

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

Details

CVE-2022-25858

Vulnerable Library - terser-5.10.0.tgz

JavaScript parser, mangler/compressor and beautifier toolkit for ES6+

Library home page: https://registry.npmjs.org/terser/-/terser-5.10.0.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • html-webpack-plugin-5.5.0.tgz (Root Library)
    • html-minifier-terser-6.1.0.tgz
      • terser-5.10.0.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

The package terser before 4.8.1, from 5.0.0 and before 5.14.2 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure usage of regular expressions.

Publish Date: 2022-07-15

URL: CVE-2022-25858

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-25858

Release Date: 2022-07-15

Fix Resolution (terser): 5.14.2

Direct dependency fix Resolution (html-webpack-plugin): 5.5.1

Step up your Open Source Security Game with Mend here

webpack-5.66.0.tgz: 1 vulnerabilities (highest severity is: 9.8)

Vulnerable Library - webpack-5.66.0.tgz

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

Library home page: https://registry.npmjs.org/webpack/-/webpack-5.66.0.tgz

Path to dependency file: /package.json

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

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (webpack version) Remediation Possible**
CVE-2023-28154 Critical 9.8 webpack-5.66.0.tgz Direct 5.76.0

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

Details

CVE-2023-28154

Vulnerable Library - webpack-5.66.0.tgz

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

Library home page: https://registry.npmjs.org/webpack/-/webpack-5.66.0.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • webpack-5.66.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Webpack 5 before 5.76.0 does not avoid cross-realm object access. ImportParserPlugin.js mishandles the magic comment feature. An attacker who controls a property of an untrusted object can obtain access to the real global object.

Publish Date: 2023-03-13

URL: CVE-2023-28154

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

Release Date: 2023-03-13

Fix Resolution: 5.76.0

Step up your Open Source Security Game with Mend here

Edge case of markdown heading

To release v1.0.0, have to resolve edge case of markdown input

  • Case 1
  • Case 2
  • Case 3
  • Case 4

Case 1

## h2 ####
expected current
depth 2 2
text h2 h2 ####
href #h2 #h2-####

Case 2

# [h1](#foo) bar
expected current
depth 1 1
text h1 bar h1
href #h1-bar #foo

Case 3

# bar [h1](#foo)
expected current
depth 1 1
text bar h1 h1
href #bar-h1 #foo

Case 4

```python
# this is comment
```
expected current
depth - 1
text - this is comment
href - #this-is-comment

Code refactoring to improve readability

Why need refactoring

When I add hyperlinkPrefix in #21,
I thought "There are too many function dependencies..."

For instance

  • ReactMarkdownHeading component depends on parseHeadingText.
  • parseHeadingText depends on extractText.
  • extractText depends on parseText.
  • parseText depends on parseText itself...

eslint-8.7.0.tgz: 2 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - eslint-8.7.0.tgz

Path to dependency file: /package.json

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

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (eslint version) Remediation Possible**
CVE-2023-26115 High 7.5 word-wrap-1.2.3.tgz Transitive 8.8.0
CVE-2022-3517 High 7.5 minimatch-3.0.4.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-2023-26115

Vulnerable Library - word-wrap-1.2.3.tgz

Wrap words to a specified length.

Library home page: https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/word-wrap/package.json

Dependency Hierarchy:

  • eslint-8.7.0.tgz (Root Library)
    • optionator-0.9.1.tgz
      • word-wrap-1.2.3.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

All versions of the package word-wrap are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of an insecure regular expression within the result variable.

Publish Date: 2023-06-22

URL: CVE-2023-26115

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-j8xg-fqg3-53r7

Release Date: 2023-06-22

Fix Resolution (word-wrap): 1.2.4

Direct dependency fix Resolution (eslint): 8.8.0

Step up your Open Source Security Game with Mend here

CVE-2022-3517

Vulnerable Library - minimatch-3.0.4.tgz

a glob matcher in javascript

Library home page: https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • eslint-8.7.0.tgz (Root Library)
    • minimatch-3.0.4.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

A vulnerability was found in the minimatch package. This flaw allows a Regular Expression Denial of Service (ReDoS) when calling the braceExpand function with specific arguments, resulting in a Denial of Service.

Publish Date: 2022-10-17

URL: CVE-2022-3517

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: 2022-10-17

Fix Resolution: minimatch - 3.0.5

Step up your Open Source Security Game with Mend here

Add test

I should add test to maintain this.

Items

  • component test
  • util test

npm-run-all-4.1.5.tgz: 2 vulnerabilities (highest severity is: 9.8)

Vulnerable Library - npm-run-all-4.1.5.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/shell-quote/package.json

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (npm-run-all version) Remediation Possible**
CVE-2021-42740 Critical 9.8 shell-quote-1.7.2.tgz Transitive N/A*
CVE-2022-25883 High 7.5 semver-5.7.1.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-42740

Vulnerable Library - shell-quote-1.7.2.tgz

quote and parse shell commands

Library home page: https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/shell-quote/package.json

Dependency Hierarchy:

  • npm-run-all-4.1.5.tgz (Root Library)
    • shell-quote-1.7.2.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

The shell-quote package before 1.7.3 for Node.js allows command injection. An attacker can inject unescaped shell metacharacters through a regex designed to support Windows drive letters. If the output of this package is passed to a real shell as a quoted argument to a command with exec(), an attacker can inject arbitrary commands. This is because the Windows drive letter regex character class is {A-z] instead of the correct {A-Za-z]. Several shell metacharacters exist in the space between capital letter Z and lower case letter a, such as the backtick character.

Publish Date: 2021-10-21

URL: CVE-2021-42740

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: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42740

Release Date: 2021-10-21

Fix Resolution: shell-quote - 1.7.3

Step up your Open Source Security Game with Mend here

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/nearley/node_modules/semver/package.json,/node_modules/cross-spawn/node_modules/semver/package.json,/node_modules/normalize-package-data/node_modules/semver/package.json

Dependency Hierarchy:

  • npm-run-all-4.1.5.tgz (Root Library)
    • read-pkg-3.0.0.tgz
      • normalize-package-data-2.5.0.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 (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-c2qf-rxjj-qqgw

Release Date: 2023-06-21

Fix Resolution: semver - 5.7.2,6.3.1,7.5.2;org.webjars.npm:semver:7.5.2

Step up your Open Source Security Game with Mend here

eslint-plugin-react-7.28.0.tgz: 1 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - eslint-plugin-react-7.28.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/make-dir/node_modules/semver/package.json,/node_modules/istanbul-lib-instrument/node_modules/semver/package.json,/node_modules/@babel/helper-compilation-targets/node_modules/semver/package.json,/node_modules/eslint-plugin-react/node_modules/semver/package.json,/node_modules/@babel/core/node_modules/semver/package.json

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (eslint-plugin-react version) Remediation Possible**
CVE-2022-25883 High 7.5 semver-6.3.0.tgz Transitive 7.33.0

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

Details

CVE-2022-25883

Vulnerable Library - semver-6.3.0.tgz

The semantic version parser used by npm.

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

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/make-dir/node_modules/semver/package.json,/node_modules/istanbul-lib-instrument/node_modules/semver/package.json,/node_modules/@babel/helper-compilation-targets/node_modules/semver/package.json,/node_modules/eslint-plugin-react/node_modules/semver/package.json,/node_modules/@babel/core/node_modules/semver/package.json

Dependency Hierarchy:

  • eslint-plugin-react-7.28.0.tgz (Root Library)
    • semver-6.3.0.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

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 (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-c2qf-rxjj-qqgw

Release Date: 2023-06-21

Fix Resolution (semver): 6.3.1

Direct dependency fix Resolution (eslint-plugin-react): 7.33.0

Step up your Open Source Security Game with Mend here

Prefix for the hyperlink

Hi
I am using rich-markdown-editor and it generates by default the following html for the headers ex:
<h2><button type="button" class="heading-anchor">#</button><span class="heading-content">Introduction</span></h2>

I can navigate to the headers
using the link http://localhost:3000/blog/post-01/#h-introduction, this link is prefixed with h- by default.
My suggestion is to add hyperLinkPrefix to the props, which more less will be implemented as blankSpaceReplaceText, and the line 19 on parseText.ts becomes
${hyperlinkPrefix}${text.replace(/\s+/g, blankSpaceReplaceText)}

jest-27.4.7.tgz: 2 vulnerabilities (highest severity is: 9.8)

Vulnerable Library - jest-27.4.7.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/tough-cookie/package.json

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (jest version) Remediation Possible**
CVE-2023-26136 Critical 9.8 tough-cookie-4.0.0.tgz Transitive 27.5.0
CVE-2023-45133 High 8.8 traverse-7.16.3.tgz Transitive 27.5.0

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

Details

CVE-2023-26136

Vulnerable Library - tough-cookie-4.0.0.tgz

RFC6265 Cookies and Cookie Jar for node.js

Library home page: https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/tough-cookie/package.json

Dependency Hierarchy:

  • jest-27.4.7.tgz (Root Library)
    • jest-cli-27.4.7.tgz
      • jest-config-27.4.7.tgz
        • jest-environment-jsdom-27.4.6.tgz
          • jsdom-16.7.0.tgz
            • tough-cookie-4.0.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Versions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in rejectPublicSuffixes=false mode. This issue arises from the manner in which the objects are initialized.

Publish Date: 2023-07-01

URL: CVE-2023-26136

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: https://www.cve.org/CVERecord?id=CVE-2023-26136

Release Date: 2023-07-01

Fix Resolution (tough-cookie): 4.1.3

Direct dependency fix Resolution (jest): 27.5.0

Step up your Open Source Security Game with Mend here

CVE-2023-45133

Vulnerable Library - traverse-7.16.3.tgz

The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes

Library home page: https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/@babel/traverse/package.json

Dependency Hierarchy:

  • jest-27.4.7.tgz (Root Library)
    • core-27.4.7.tgz
      • jest-snapshot-27.4.6.tgz
        • traverse-7.16.3.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Babel is a compiler for writingJavaScript. In @babel/traverse prior to versions 7.23.2 and 8.0.0-alpha.4 and all versions of babel-traverse, using Babel to compile code that was specifically crafted by an attacker can lead to arbitrary code execution during compilation, when using plugins that rely on the path.evaluate()or path.evaluateTruthy() internal Babel methods. Known affected plugins are @babel/plugin-transform-runtime; @babel/preset-env when using its useBuiltIns option; and any "polyfill provider" plugin that depends on @babel/helper-define-polyfill-provider, such as babel-plugin-polyfill-corejs3, babel-plugin-polyfill-corejs2, babel-plugin-polyfill-es-shims, babel-plugin-polyfill-regenerator. No other plugins under the @babel/ namespace are impacted, but third-party plugins might be. Users that only compile trusted code are not impacted. The vulnerability has been fixed in @babel/[email protected] and @babel/[email protected]. Those who cannot upgrade @babel/traverse and are using one of the affected packages mentioned above should upgrade them to their latest version to avoid triggering the vulnerable code path in affected @babel/traverse versions: @babel/plugin-transform-runtime v7.23.2, @babel/preset-env v7.23.2, @babel/helper-define-polyfill-provider v0.4.3, babel-plugin-polyfill-corejs2 v0.4.6, babel-plugin-polyfill-corejs3 v0.8.5, babel-plugin-polyfill-es-shims v0.10.0, babel-plugin-polyfill-regenerator v0.5.3.

Publish Date: 2023-10-12

URL: CVE-2023-45133

CVSS 3 Score Details (8.8)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Local
    • Attack Complexity: Low
    • Privileges Required: Low
    • User Interaction: None
    • Scope: Changed
  • 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-67hx-6x53-jw92

Release Date: 2023-10-12

Fix Resolution (@babel/traverse): 7.23.2

Direct dependency fix Resolution (jest): 27.5.0

Step up your Open Source Security Game with Mend here

eslint-plugin-5.10.0.tgz: 1 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - eslint-plugin-5.10.0.tgz

Path to dependency file: /package.json

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

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (eslint-plugin version) Remediation Possible**
CVE-2022-25883 High 7.5 semver-7.3.5.tgz Transitive 6.1.0

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

Details

CVE-2022-25883

Vulnerable Library - semver-7.3.5.tgz

The semantic version parser used by npm.

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

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • eslint-plugin-5.10.0.tgz (Root Library)
    • semver-7.3.5.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 (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-c2qf-rxjj-qqgw

Release Date: 2023-06-21

Fix Resolution (semver): 7.5.2

Direct dependency fix Resolution (@typescript-eslint/eslint-plugin): 6.1.0

Step up your Open Source Security Game with Mend here

Question mark causing an issue in ToC

I have a markdown as ## What is Low-code? and using react-markdown for generating HTML, and it creates header like <h2 id="What-is-Low-code-">What is Low-code?</h2>, but react-markdown-heading creates with a question mark like /learn#What-is-Low-code? in ToC. So, when I click on it, nothing happens, any work around?

Here is an example:
https://nucleoid.com/learn

webpack-dev-server-4.7.3.tgz: 11 vulnerabilities (highest severity is: 9.8)

Vulnerable Library - webpack-dev-server-4.7.3.tgz

Path to dependency file: /package.json

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

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (webpack-dev-server version) Remediation Possible**
CVE-2023-42282 Critical 9.8 ip-1.1.5.tgz Transitive 4.7.4
CVE-2021-43138 High 7.8 async-2.6.3.tgz Transitive 4.7.4
CVE-2022-24999 High 7.5 qs-6.7.0.tgz Transitive 4.7.4
CVE-2022-24772 High 7.5 node-forge-1.2.1.tgz Transitive 4.7.4
CVE-2022-24771 High 7.5 node-forge-1.2.1.tgz Transitive 4.7.4
CVE-2024-29180 High 7.4 webpack-dev-middleware-5.3.0.tgz Transitive 4.7.4
CVE-2024-28849 Medium 6.5 follow-redirects-1.14.7.tgz Transitive N/A*
CVE-2024-29041 Medium 6.1 express-4.17.1.tgz Transitive N/A*
CVE-2023-26159 Medium 6.1 follow-redirects-1.14.7.tgz Transitive 4.7.4
CVE-2022-0536 Medium 5.9 follow-redirects-1.14.7.tgz Transitive 4.7.4
CVE-2022-24773 Medium 5.3 node-forge-1.2.1.tgz Transitive 4.7.4

*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-2023-42282

Vulnerable Library - ip-1.1.5.tgz

[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)

Library home page: https://registry.npmjs.org/ip/-/ip-1.1.5.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • bonjour-3.5.0.tgz
      • multicast-dns-6.2.3.tgz
        • dns-packet-1.3.4.tgz
          • ip-1.1.5.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

The ip package before 1.1.9 for Node.js might allow SSRF because some IP addresses (such as 0x7f.1) are improperly categorized as globally routable via isPublic.

Publish Date: 2024-02-08

URL: CVE-2023-42282

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-78xj-cgh5-2h22

Release Date: 2024-02-08

Fix Resolution (ip): 1.1.9

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2021-43138

Vulnerable Library - async-2.6.3.tgz

Higher-order functions and common patterns for asynchronous code

Library home page: https://registry.npmjs.org/async/-/async-2.6.3.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • portfinder-1.0.28.tgz
      • async-2.6.3.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

In Async before 2.6.4 and 3.x before 3.2.2, a malicious user can obtain privileges via the mapValues() method, aka lib/internal/iterator.js createObjectIterator prototype pollution.

Publish Date: 2022-04-06

URL: CVE-2021-43138

CVSS 3 Score Details (7.8)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Local
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • 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://nvd.nist.gov/vuln/detail/CVE-2021-43138

Release Date: 2022-04-06

Fix Resolution (async): 2.6.4

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2022-24999

Vulnerable Library - qs-6.7.0.tgz

A querystring parser that supports nesting and arrays, with a depth limit

Library home page: https://registry.npmjs.org/qs/-/qs-6.7.0.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • express-4.17.1.tgz
      • qs-6.7.0.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

qs before 6.10.3, as used in Express before 4.17.3 and other products, allows attackers to cause a Node process hang for an Express application because an __ proto__ key can be used. In many typical Express use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as a[proto]=b&a[proto]&a[length]=100000000. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4 (and therefore Express 4.17.3, which has "deps: [email protected]" in its release description, is not vulnerable).

Publish Date: 2022-11-26

URL: CVE-2022-24999

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-2022-24999

Release Date: 2022-11-26

Fix Resolution (qs): 6.7.3

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2022-24772

Vulnerable Library - node-forge-1.2.1.tgz

JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Library home page: https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/node-forge/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • selfsigned-2.0.0.tgz
      • node-forge-1.2.1.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.3.0, RSA PKCS#1 v1.5 signature verification code does not check for tailing garbage bytes after decoding a DigestInfo ASN.1 structure. This can allow padding bytes to be removed and garbage data added to forge a signature when a low public exponent is being used. The issue has been addressed in node-forge version 1.3.0. There are currently no known workarounds.

Publish Date: 2022-03-18

URL: CVE-2022-24772

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

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-24772

Release Date: 2022-03-18

Fix Resolution (node-forge): 1.3.0

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2022-24771

Vulnerable Library - node-forge-1.2.1.tgz

JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Library home page: https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/node-forge/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • selfsigned-2.0.0.tgz
      • node-forge-1.2.1.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.3.0, RSA PKCS#1 v1.5 signature verification code is lenient in checking the digest algorithm structure. This can allow a crafted structure that steals padding bytes and uses unchecked portion of the PKCS#1 encoded message to forge a signature when a low public exponent is being used. The issue has been addressed in node-forge version 1.3.0. There are currently no known workarounds.

Publish Date: 2022-03-18

URL: CVE-2022-24771

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

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-24771

Release Date: 2022-03-18

Fix Resolution (node-forge): 1.3.0

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2024-29180

Vulnerable Library - webpack-dev-middleware-5.3.0.tgz

A development middleware for webpack

Library home page: https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.0.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/webpack-dev-middleware/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • webpack-dev-middleware-5.3.0.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Prior to versions 7.1.0, 6.1.2, and 5.3.4, the webpack-dev-middleware development middleware for devpack does not validate the supplied URL address sufficiently before returning the local file. It is possible to access any file on the developer's machine. The middleware can either work with the physical filesystem when reading the files or it can use a virtualized in-memory memfs filesystem. If writeToDisk configuration option is set to true, the physical filesystem is used. The getFilenameFromUrl method is used to parse URL and build the local file path. The public path prefix is stripped from the URL, and the unsecaped path suffix is appended to the outputPath. As the URL is not unescaped and normalized automatically before calling the midlleware, it is possible to use %2e and %2f sequences to perform path traversal attack.

Developers using webpack-dev-server or webpack-dev-middleware are affected by the issue. When the project is started, an attacker might access any file on the developer's machine and exfiltrate the content. If the development server is listening on a public IP address (or 0.0.0.0), an attacker on the local network can access the local files without any interaction from the victim (direct connection to the port). If the server allows access from third-party domains, an attacker can send a malicious link to the victim. When visited, the client side script can connect to the local server and exfiltrate the local files. Starting with fixed versions 7.1.0, 6.1.2, and 5.3.4, the URL is unescaped and normalized before any further processing.

Publish Date: 2024-03-21

URL: CVE-2024-29180

CVSS 3 Score Details (7.4)

Base Score Metrics:

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

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-wr3j-pwj9-hqq6

Release Date: 2024-03-21

Fix Resolution (webpack-dev-middleware): 5.3.4

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2024-28849

Vulnerable Library - follow-redirects-1.14.7.tgz

HTTP and HTTPS modules that follow redirects.

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/follow-redirects/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • http-proxy-middleware-2.0.1.tgz
      • http-proxy-1.18.1.tgz
        • follow-redirects-1.14.7.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

follow-redirects is an open source, drop-in replacement for Node's http and https modules that automatically follows redirects. In affected versions follow-redirects only clears authorization header during cross-domain redirect, but keep the proxy-authentication header which contains credentials too. This vulnerability may lead to credentials leak, but has been addressed in version 1.15.6. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Publish Date: 2024-03-14

URL: CVE-2024-28849

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • 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

Origin: GHSA-cxjh-pqwp-8mfp

Release Date: 2024-03-14

Fix Resolution: follow-redirects - 1.15.6

Step up your Open Source Security Game with Mend here

CVE-2024-29041

Vulnerable Library - express-4.17.1.tgz

Fast, unopinionated, minimalist web framework

Library home page: https://registry.npmjs.org/express/-/express-4.17.1.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • express-4.17.1.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 are affected by an open redirect vulnerability using malformed URLs. When a user of Express performs a redirect using a user-provided URL Express performs an encode using encodeurl on the contents before passing it to the location header. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list. The main method impacted is res.location() but this is also called from within res.redirect(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Publish Date: 2024-03-25

URL: CVE-2024-29041

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-rv95-896h-c2vc

Release Date: 2024-03-25

Fix Resolution: express - 4.19.0

Step up your Open Source Security Game with Mend here

CVE-2023-26159

Vulnerable Library - follow-redirects-1.14.7.tgz

HTTP and HTTPS modules that follow redirects.

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/follow-redirects/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • http-proxy-middleware-2.0.1.tgz
      • http-proxy-1.18.1.tgz
        • follow-redirects-1.14.7.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.

Publish Date: 2024-01-02

URL: CVE-2023-26159

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: https://www.cve.org/CVERecord?id=CVE-2023-26159

Release Date: 2024-01-02

Fix Resolution (follow-redirects): 1.15.4

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2022-0536

Vulnerable Library - follow-redirects-1.14.7.tgz

HTTP and HTTPS modules that follow redirects.

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/follow-redirects/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • http-proxy-middleware-2.0.1.tgz
      • http-proxy-1.18.1.tgz
        • follow-redirects-1.14.7.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Improper Removal of Sensitive Information Before Storage or Transfer in NPM follow-redirects prior to 1.14.8.

Publish Date: 2022-02-09

URL: CVE-2022-0536

CVSS 3 Score Details (5.9)

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

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-0536

Release Date: 2022-02-09

Fix Resolution (follow-redirects): 1.14.8

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

CVE-2022-24773

Vulnerable Library - node-forge-1.2.1.tgz

JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Library home page: https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/node-forge/package.json

Dependency Hierarchy:

  • webpack-dev-server-4.7.3.tgz (Root Library)
    • selfsigned-2.0.0.tgz
      • node-forge-1.2.1.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.3.0, RSA PKCS#1 v1.5 signature verification code does not properly check DigestInfo for a proper ASN.1 structure. This can lead to successful verification with signatures that contain invalid structures but a valid digest. The issue has been addressed in node-forge version 1.3.0. There are currently no known workarounds.

Publish Date: 2022-03-18

URL: CVE-2022-24773

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

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-24773

Release Date: 2022-03-18

Fix Resolution (node-forge): 1.3.0

Direct dependency fix Resolution (webpack-dev-server): 4.7.4

Step up your Open Source Security Game with Mend here

css-loader-6.5.1.tgz: 1 vulnerabilities (highest severity is: 5.3)

Vulnerable Library - css-loader-6.5.1.tgz

Path to dependency file: /package.json

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

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (css-loader version) Remediation Possible**
CVE-2023-44270 Medium 5.3 postcss-8.4.5.tgz Transitive 6.9.0

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

Details

CVE-2023-44270

Vulnerable Library - postcss-8.4.5.tgz

Tool for transforming styles with JS plugins

Library home page: https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • css-loader-6.5.1.tgz (Root Library)
    • postcss-8.4.5.tgz (Vulnerable Library)

Found in HEAD commit: e103b6386c0031666a1203e2e1dc93586e0cd828

Found in base branch: main

Vulnerability Details

An issue was discovered in PostCSS before 8.4.31. The vulnerability affects linters using PostCSS to parse external untrusted CSS. An attacker can prepare CSS in such a way that it will contains parts parsed by PostCSS as a CSS comment. After processing by PostCSS, it will be included in the PostCSS output in CSS nodes (rules, properties) despite being included in a comment.

Publish Date: 2023-09-29

URL: CVE-2023-44270

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

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2023-44270

Release Date: 2023-09-29

Fix Resolution (postcss): 8.4.31

Direct dependency fix Resolution (css-loader): 6.9.0

Step up your Open Source Security Game with Mend here

ts-jest-27.1.3.tgz: 2 vulnerabilities (highest severity is: 9.8)

Vulnerable Library - ts-jest-27.1.3.tgz

Path to dependency file: /package.json

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

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (ts-jest version) Remediation Possible**
CVE-2021-44906 Critical 9.8 minimist-1.2.5.tgz Transitive 27.1.4
CVE-2022-46175 High 8.8 json5-2.2.0.tgz Transitive 27.1.4

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

Details

CVE-2021-44906

Vulnerable Library - minimist-1.2.5.tgz

parse argument options

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

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • ts-jest-27.1.3.tgz (Root Library)
    • json5-2.2.0.tgz
      • minimist-1.2.5.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): 1.2.6

Direct dependency fix Resolution (ts-jest): 27.1.4

Step up your Open Source Security Game with Mend here

CVE-2022-46175

Vulnerable Library - json5-2.2.0.tgz

JSON for humans.

Library home page: https://registry.npmjs.org/json5/-/json5-2.2.0.tgz

Path to dependency file: /package.json

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

Dependency Hierarchy:

  • ts-jest-27.1.3.tgz (Root Library)
    • json5-2.2.0.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e.g. for config files). The parse method of the JSON5 library before and including versions 1.0.1 and 2.2.1 does not restrict parsing of keys named __proto__, allowing specially crafted strings to pollute the prototype of the resulting object. This vulnerability pollutes the prototype of the object returned by JSON5.parse and not the global Object prototype, which is the commonly understood definition of Prototype Pollution. However, polluting the prototype of a single object can have significant security impact for an application if the object is later used in trusted operations. This vulnerability could allow an attacker to set arbitrary and unexpected keys on the object returned from JSON5.parse. The actual impact will depend on how applications utilize the returned object and how they filter unwanted keys, but could include denial of service, cross-site scripting, elevation of privilege, and in extreme cases, remote code execution. JSON5.parse should restrict parsing of __proto__ keys when parsing JSON strings to objects. As a point of reference, the JSON.parse method included in JavaScript ignores __proto__ keys. Simply changing JSON5.parse to JSON.parse in the examples above mitigates this vulnerability. This vulnerability is patched in json5 versions 1.0.2, 2.2.2, and later.

Publish Date: 2022-12-24

URL: CVE-2022-46175

CVSS 3 Score Details (8.8)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: Low
    • 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.cve.org/CVERecord?id=CVE-2022-46175

Release Date: 2022-12-24

Fix Resolution (json5): 2.2.2

Direct dependency fix Resolution (ts-jest): 27.1.4

Step up your Open Source Security Game with Mend here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.