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

CVE-2021-3803 (High) detected in nth-check-1.0.2.tgz #1081

Closed
mend-for-github-com bot opened this issue Jan 4, 2022 · 2 comments · Fixed by #1422
Closed

CVE-2021-3803 (High) detected in nth-check-1.0.2.tgz #1081

mend-for-github-com bot opened this issue Jan 4, 2022 · 2 comments · Fixed by #1422
Assignees
Labels
cve Security vulnerabilities detected by Dependabot or Mend high severity High severity CVE Mend: dependency security vulnerability Security vulnerability detected by Mend v2.0.0

Comments

@mend-for-github-com
Copy link

mend-for-github-com bot commented Jan 4, 2022

CVE-2021-3803 - High Severity Vulnerability

Vulnerable Library - nth-check-1.0.2.tgz

performant nth-check parser & compiler

Library home page: https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz

Dependency Hierarchy:

  • cheerio-0.22.0.tgz (Root Library)
    • css-select-1.2.0.tgz
      • nth-check-1.0.2.tgz (Vulnerable Library)

Found in HEAD commit: 4fd064970b66ce555f48c22dfab6ed965d0e260a

Found in base branch: main

Vulnerability Details

nth-check is vulnerable to Inefficient Regular Expression Complexity

Publish Date: 2021-09-17

URL: CVE-2021-3803

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: fb55/nth-check@v2.0.0...v2.0.1

Release Date: 2021-09-17

Fix Resolution (nth-check): 2.0.1

Direct dependency fix Resolution (cheerio): 1.0.0-rc.5

@mend-for-github-com mend-for-github-com bot added the Mend: dependency security vulnerability Security vulnerability detected by Mend label Jan 4, 2022
@tmarkley tmarkley added high severity High severity CVE cve Security vulnerabilities detected by Dependabot or Mend labels Jan 4, 2022
@tmarkley
Copy link
Contributor

tmarkley commented Jan 6, 2022

$ npm ls nth-check
opensearch-dashboards@2.0.0 /home/ubuntu/ws/OpenSearch-Dashboards
├─┬ cheerio@0.22.0
│ └─┬ css-select@1.2.0
│   └── nth-check@1.0.2
└─┬ svgo@1.3.2 extraneous
  └─┬ css-select@2.0.2 extraneous
    └── nth-check@1.0.2 deduped
$ yarn why nth-check
yarn why v1.22.17
[1/4] Why do we have the module "nth-check"...?
[2/4] Initialising dependency graph...
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@~4.4.2"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "nth-check@1.0.2"
info Reasons this module exists
   - "_project_#css-select" depends on it
   - Hoisted from "_project_#css-select#nth-check"
   - Hoisted from "_project_#@osd#storybook#@storybook#react#@svgr#webpack#@svgr#plugin-svgo#svgo#css-select#nth-check"
info Disk size without dependencies: "24KB"
info Disk size with unique dependencies: "36KB"
info Disk size with transitive dependencies: "36KB"
info Number of shared dependencies: 1
Done in 1.85s.

@tmarkley
Copy link
Contributor

tmarkley commented Jan 6, 2022

The @storybook/react changes in #1104 remove this dependency, so we'll want to wait for that to be merged first before addressing the css-select dependency.

@tmarkley tmarkley self-assigned this Jan 18, 2022
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under /src/test_utils and /src/dev/jest into the
@osd/test package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Feb 11, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 3, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 3, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 4, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 4, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 14, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
is a dependency of `cheerio`. Bumping `cheerio` requires upgrading from
TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
The main changes that impact Dashboards is that `resolve`'s parameters
are no longer optional in `Promise`s, and that potentially undefined
indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
`@osd/test` package to simplify.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 15, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 15, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.
* Fixes inconsistent plugin installation tests.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 22, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.
* Fixes inconsistent plugin installation tests.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 23, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.
* Fixes inconsistent plugin installation tests.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 25, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.
* Fixes inconsistent plugin installation tests.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Apr 1, 2022
* Addressing the `nth-check` CVE required bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.
* Fixes inconsistent plugin installation tests.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Apr 2, 2022
`nth-check` is a dependency of `cheerio > css-select`. Even though our dependency on `cheerio@0.22.0` pulls in `nth-check@~1.0.1`, its signature hasn't changed in `nth-check@2.0.1` and a resolution to bump works.

Resolves opensearch-project#1081

Signed-off-by: Miki <miki@amazon.com>
AMoo-Miki added a commit that referenced this issue Apr 4, 2022
`nth-check` is a dependency of `cheerio > css-select`. Even though our dependency on `cheerio@0.22.0` pulls in `nth-check@~1.0.1`, its signature hasn't changed in `nth-check@2.0.1` and a resolution to bump works.

Resolves #1081

Signed-off-by: Miki <miki@amazon.com>
tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Apr 13, 2022
* Addressing the `nth-check` CVE requires bumping `css-select`, which
  is a dependency of `cheerio`. Bumping `cheerio` requires upgrading
  from TypeScript 4.0 to 4.1.
* TypeScript 4.1 introduces a set of [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes).
  The main changes that impact Dashboards is that `resolve`'s parameters
  are no longer optional in `Promise`s, and that potentially undefined
  indexes must use the `!` non-null assertion operator.
* The upgrades to TypeScript and `cheerio` triggered some jest errors
  which prompted the upgrade to the `enzyme` dependencies.
* Merges files under `/src/test_utils` and `/src/dev/jest` into the
  `@osd/test` package to simplify.
* Fixes the naming of the `@osd/eslint-config-opensearch-dashboards`
  package.
* Fixes inconsistent plugin installation tests.

Resolves opensearch-project#1081

Signed-off-by: Tommy Markley <markleyt@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Mar 30, 2023
Issue Resolve:
opensearch-project#1081

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Mar 30, 2023
…to 2.0.1

Issue Resolve:
opensearch-project#1081

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Mar 30, 2023
…to 2.0.1

Issue Resolve
opensearch-project#1081

Backport PR
opensearch-project#1422

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Mar 30, 2023
Issue Resolve
opensearch-project#1081

Backport PR
opensearch-project#1422

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Mar 30, 2023
Issue Resolve
opensearch-project#1081

Backport PR
opensearch-project#1422

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
ananzh added a commit that referenced this issue Mar 30, 2023
Issue Resolve
#1081

Backport PR
#1422

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this issue Mar 30, 2023
Issue Resolve
#1081

Backport PR
#1422

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
(cherry picked from commit 430c93b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ashwin-pc pushed a commit that referenced this issue Apr 3, 2023
Issue Resolve
#1081

Backport PR
#1422


(cherry picked from commit 430c93b)

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cve Security vulnerabilities detected by Dependabot or Mend high severity High severity CVE Mend: dependency security vulnerability Security vulnerability detected by Mend v2.0.0
Projects
None yet
2 participants