swagger-api / swagger-api/swagger-codegen

CVE-2019-5413 (High) detected in morgan-1.6.1.tgz

Open
#11,566 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-5413 - High Severity Vulnerability

Vulnerable Library - morgan-1.6.1.tgz

HTTP request logger middleware for node.js

Library home page: https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz

Path to dependency file: /samples/dynamic-html/package.json

Path to vulnerable library: /samples/dynamic-html/node_modules/morgan/package.json

Dependency Hierarchy:

  • express-3.21.2.tgz (Root Library)
    • connect-2.30.2.tgz
      • morgan-1.6.1.tgz (Vulnerable Library)

Found in HEAD commit: 4b7a8d7d7384aa6a27d6309c35ade0916edae7ed

Found in base branches: 3.0.0, master

Vulnerability Details

An attacker can use the format parameter to inject arbitrary commands in the npm package morgan < 1.9.1.

Publish Date: 2019-03-21

URL: CVE-2019-5413

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://hackerone.com/reports/390881

Release Date: 2019-10-09

Fix Resolution (morgan): 1.9.1

Direct dependency fix Resolution (express): 4.0.0


  • 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

Start with samples/dynamic-html/package.json and inspect how its express/connect dependency brings in morgan 1.6.1. Update the dependency resolution to morgan 1.9.1 or newer, then verify that the vulnerable version is no longer present in the sample's dependency tree.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.