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-44907 (Low) detected in qs-6.10.3.tgz, qs-6.5.2.tgz #1375

Closed
mend-for-github-com bot opened this issue Mar 23, 2022 · 2 comments · Fixed by #1380
Closed

CVE-2021-44907 (Low) detected in qs-6.10.3.tgz, qs-6.5.2.tgz #1375

mend-for-github-com bot opened this issue Mar 23, 2022 · 2 comments · Fixed by #1380
Assignees
Labels
cve Security vulnerabilities detected by Dependabot or Mend low severity Low 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 Mar 23, 2022

CVE-2021-44907 - Low Severity Vulnerability

Vulnerable Libraries - qs-6.10.3.tgz, qs-6.5.2.tgz

qs-6.10.3.tgz

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

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

Dependency Hierarchy:

  • grunt-contrib-watch-1.1.0.tgz (Root Library)
    • tiny-lr-1.1.1.tgz
      • qs-6.10.3.tgz (Vulnerable Library)
qs-6.5.2.tgz

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

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

Dependency Hierarchy:

  • re2-1.15.4.tgz (Root Library)
    • node-gyp-7.0.0.tgz
      • request-2.88.2.tgz
        • qs-6.5.2.tgz (Vulnerable Library)

Found in HEAD commit: 6b66b115cbd108473c249589a334a847710b49ef

Found in base branch: main

Vulnerability Details

A Denial of Service vulnerability exists in qs up to 6.8.0 due to insufficient sanitization of property in the gs.parse function. The merge() function allows the assignment of properties on an array in the query. For any property being assigned, a value in the array is converted to an object containing these properties. Essentially, this means that the property whose expected type is Array always has to be checked with Array.isArray() by the user. This may not be obvious to the user and can cause unexpected behavior.

Publish Date: 2022-03-17

URL: CVE-2021-44907

CVSS 3 Score Details (3.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: Low
    • 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-2021-44907

Release Date: 2022-03-17

Fix Resolution (qs): 6.8.1

Direct dependency fix Resolution (re2): 1.16.0

@mend-for-github-com mend-for-github-com bot added the Mend: dependency security vulnerability Security vulnerability detected by Mend label Mar 23, 2022
@tmarkley tmarkley added cve Security vulnerabilities detected by Dependabot or Mend low severity Low severity CVE labels Mar 23, 2022
@tmarkley tmarkley self-assigned this Mar 24, 2022
@tmarkley
Copy link
Contributor

$ yarn why qs
yarn why v1.22.17
[1/4] Why do we have the module "qs"...?
[2/4] Initialising dependency graph...
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@~4.5.2"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "qs@6.10.3"
info Has been hoisted to "qs"
info Reasons this module exists
   - "workspace-aggregator-38ce2c19-b0f5-40ea-9d89-56569056b319" depends on it
   - Hoisted from "_project_#supertest#superagent#qs"
info Disk size without dependencies: "332KB"
info Disk size with unique dependencies: "384KB"
info Disk size with transitive dependencies: "7.31MB"
info Number of shared dependencies: 19
=> Found "grunt-contrib-watch#qs@6.10.3"
info Reasons this module exists
   - "_project_#grunt-contrib-watch#tiny-lr" depends on it
   - Hoisted from "_project_#grunt-contrib-watch#tiny-lr#qs"
   - in the nohoist list ["/_project_/**/@types/*","/_project_/**/@types/*/**","/_project_/**/grunt-*","/_project_/**/grunt-*/**","/_project_/@elastic/eui/rehype-react","/_project_/@elastic/eui/remark-rehype","/_project_/@elastic/eui/remark-rehype/**"]
info Disk size without dependencies: "272KB"
info Disk size with unique dependencies: "324KB"
info Disk size with transitive dependencies: "7.25MB"
info Number of shared dependencies: 19
=> Found "formidable#qs@6.9.3"
info This module exists because "_project_#supertest#superagent#formidable" depends on it.
info Disk size without dependencies: "236KB"
info Disk size with unique dependencies: "236KB"
info Disk size with transitive dependencies: "236KB"
info Number of shared dependencies: 0
=> Found "express#qs@6.9.6"
info This module exists because "_project_#@osd#ui-framework#webpack-dev-server#express" depends on it.
info Disk size without dependencies: "228KB"
info Disk size with unique dependencies: "228KB"
info Disk size with transitive dependencies: "228KB"
info Number of shared dependencies: 0
=> Found "request#qs@6.5.2"
info This module exists because "_project_#@osd#ui-framework#node-sass#request" depends on it.
info Disk size without dependencies: "176KB"
info Disk size with unique dependencies: "176KB"
info Disk size with transitive dependencies: "176KB"
info Number of shared dependencies: 0
=> Found "body-parser#qs@6.9.6"
info This module exists because "_project_#@osd#ui-framework#webpack-dev-server#express#body-parser" depends on it.
info Disk size without dependencies: "228KB"
info Disk size with unique dependencies: "228KB"
info Disk size with transitive dependencies: "228KB"
info Number of shared dependencies: 0
Done in 1.08s.

@tmarkley
Copy link
Contributor

$ npm ls qs
opensearch-dashboards@2.0.0 /home/ubuntu/ws/OpenSearch-Dashboards
├─┬ @osd/optimizer@1.0.0 -> /home/ubuntu/ws/OpenSearch-Dashboards/packages/osd-optimizer
│ └─┬ node-sass@6.0.1
│   └─┬ request@2.88.2
│     └── qs@6.5.2 
├─┬ grunt-contrib-watch@1.1.0
│ └─┬ tiny-lr@1.1.1
│   └── qs@6.10.3 
└─┬ supertest@6.2.2
  └─┬ superagent@7.1.1
    ├─┬ formidable@2.0.1
    │ └── qs@6.9.3 
    └── qs@6.10.3 

tmarkley pushed a commit to tmarkley/OpenSearch-Dashboards that referenced this issue Mar 24, 2022
* [CHANGELOG](https://github.com/ljharb/qs/blob/v6.10.3/CHANGELOG.md)
* The upstream library with a dependency on ~6.5.2 is `node-sass`, but
  that will not be addressed until sass/node-sass#3193
  is included in a release.

Resolves opensearch-project#1375

Signed-off-by: Tommy Markley <markleyt@amazon.com>
tmarkley pushed a commit that referenced this issue Mar 24, 2022
* [CHANGELOG](https://github.com/ljharb/qs/blob/v6.10.3/CHANGELOG.md)
* The upstream library with a dependency on ~6.5.2 is `node-sass`, but
  that will not be addressed until sass/node-sass#3193
  is included in a release.

Resolves #1375

Signed-off-by: Tommy Markley <markleyt@amazon.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 low severity Low severity CVE Mend: dependency security vulnerability Security vulnerability detected by Mend v2.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant