swagger-api / swagger-api/swagger-codegen

CVE-2021-23337 (High) detected in multiple libraries

Open
#11,433 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-2021-23337 - High Severity Vulnerability

Vulnerable Libraries - lodash-4.17.11.tgz, lodash-4.17.10.tgz, lodash-4.17.20.tgz

lodash-4.17.11.tgz

Lodash modular utilities.

Library home page: https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz

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

Path to vulnerable library: /samples/client/petstore/javascript-es6/node_modules/lodash/package.json,/samples/client/petstore/javascript-promise-es6/node_modules/lodash/package.json

Dependency Hierarchy:

  • babel-cli-6.26.0.tgz (Root Library)
    • lodash-4.17.11.tgz (Vulnerable Library)
lodash-4.17.10.tgz

Lodash modular utilities.

Library home page: https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz

Path to dependency file: /samples/client/petstore/typescript-node/npm/package.json

Path to vulnerable library: /samples/client/petstore/typescript-node/npm/node_modules/lodash/package.json

Dependency Hierarchy:

  • rewire-3.0.2.tgz (Root Library)
    • babel-plugin-transform-es2015-block-scoping-6.26.0.tgz
      • lodash-4.17.10.tgz (Vulnerable Library)
lodash-4.17.20.tgz

Lodash modular utilities.

Library home page: https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz

Path to dependency file: /samples/server/petstore/nodejs/package.json

Path to vulnerable library: /samples/server/petstore/nodejs/node_modules/lodash/package.json

Dependency Hierarchy:

  • swagger-tools-0.10.1.tgz (Root Library)
    • json-refs-2.1.7.tgz
      • graphlib-2.1.8.tgz
        • lodash-4.17.20.tgz (Vulnerable Library)

Found in HEAD commit: 4b7a8d7d7384aa6a27d6309c35ade0916edae7ed

Found in base branches: 3.0.0, master

Vulnerability Details

Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.

Publish Date: 2021-02-15

URL: CVE-2021-23337

CVSS 3 Score Details (7.2)

Base Score Metrics:

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

Fix Resolution (lodash): 4.17.21

Direct dependency fix Resolution (rewire): 4.0.0

Fix Resolution (lodash): 4.17.21

Direct dependency fix Resolution (swagger-tools): 0.10.2


  • Check this box to open an automated fix PR

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

Inspect the package.json files under samples/client/petstore/javascript-es6, samples/client/petstore/javascript-promise-es6, samples/client/petstore/typescript-node/npm, and samples/server/petstore/nodejs. Start with the dependency hierarchies and suggested resolutions, then verify that lodash is no longer below 4.17.21 and that the listed direct dependencies use their fixed versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.