swagger-api / swagger-api/swagger-codegen

CVE-2019-20149 (High) detected in kind-of-6.0.2.tgz

Open
#11,323 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

security vulnerability
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

CVE-2019-20149 - High Severity Vulnerability

Vulnerable Library - kind-of-6.0.2.tgz

Get the native type of a value.

Library home page: https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz

Path to dependency file: /samples/client/petstore/javascript-es6/package.json

Path to vulnerable library: /samples/client/petstore/javascript-es6/node_modules/define-property/node_modules/kind-of/package.json,/samples/client/petstore/javascript-es6/node_modules/snapdragon-node/node_modules/kind-of/package.json,/samples/client/petstore/javascript-es6/node_modules/randomatic/node_modules/kind-of/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/snapdragon-node/node_modules/kind-of/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/define-property/node_modules/kind-of/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/base/node_modules/kind-of/package.json,/samples/client/petstore/javascript-es6/node_modules/readdirp/node_modules/kind-of/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/randomatic/node_modules/kind-of/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/nanomatch/node_modules/kind-of/package.json,/samples/client/petstore/javascript-es6/node_modules/nanomatch/node_modules/kind-of/package.json,/samples/client/petstore/javascript-es6/node_modules/base/node_modules/kind-of/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/readdirp/node_modules/kind-of/package.json

Dependency Hierarchy:

  • babel-cli-6.26.0.tgz (Root Library)
    • chokidar-1.7.0.tgz
      • readdirp-2.2.1.tgz
        • micromatch-3.1.10.tgz
          • kind-of-6.0.2.tgz (Vulnerable Library)

Found in HEAD commit: 4b7a8d7d7384aa6a27d6309c35ade0916edae7ed

Found in base branch: master

Vulnerability Details

ctorName in index.js in kind-of v6.0.2 allows external user input to overwrite certain internal attributes via a conflicting name, as demonstrated by 'constructor': {'name':'Symbol'}. Hence, a crafted payload can overwrite this builtin attribute to manipulate the type detection result.

Publish Date: 2019-12-30

URL: CVE-2019-20149

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: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-20149

Release Date: 2020-08-24

Fix Resolution: 6.0.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dependency files at samples/client/petstore/javascript-es6/package.json and samples/client/petstore/javascript-promise-es6/package.json, then inspect the listed dependency hierarchy for kind-of 6.0.2. Update the vulnerable dependency resolution to 6.0.3 and verify that the affected sample dependency trees no longer contain 6.0.2.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.