CVE-2020-8136: Fastify multipart Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-p9f8-gqjf-m75j
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2020-8136 is a MODERATE (CVSS 7.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Fastify multipart libraries in the npm ecosystem. The issue involves uncontrolled resource consumption in fastify-multipart. Remediation is available by upgrading affected packages to version 1.0.5.

CVE-2020-8136 at a Glance

CVE Identifier CVE-2020-8136
GHSA Identifier GHSA-p9f8-gqjf-m75j
Severity MODERATE
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Fastify multipart
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2020-8136

To remediate this vulnerability, upgrade all affected Fastify multipart dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fastify-multipart fixed: 1.0.5
npm install fastify-multipart@1.0.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls fastify-multipart

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2020-8136, inspect your project dependencies using npm:

npm ls fastify-multipart

Analyze the terminal output to locate any version of Fastify multipart in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.5), your application is affected.

Note: The npm ls fastify-multipart command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Fastify multipart, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Prototype pollution vulnerability in `fastify-multipart` < 1.0.5 allows an attacker to crash fastify applications parsing multipart requests by sending a specially crafted request.

CVE-2020-8136 Affected Fastify multipart Versions

1 component(s)
Fixed Versions:
1.0.5
Product / Package Ecosystem Affected Versions Fixed Version
fastify-multipart
npm
< 1.0.5
1.0.5

References

Frequently Asked Questions

What is CVE-2020-8136?
CVE-2020-8136 is a security vulnerability in Fastify multipart involving Uncontrolled Resource Consumption in fastify-multipart under CWE-400: Uncontrolled Resource Consumption.
Which Fastify multipart versions are affected?
Affected versions include releases prior to 1.0.5 across affected packages: fastify-multipart.
What version fixes CVE-2020-8136?
Upgrading to 1.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fastify-multipart affected?
Yes, fastify-multipart is affected in releases prior to 1.0.5. Upgrade your dependency to 1.0.5 or later.
What is the CVSS score of CVE-2020-8136?
CVE-2020-8136 has a CVSS v3.1 base score of 7.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2020-8136?
CVE-2020-8136 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2020-8136?
Run the dependency tree command: 'npm ls fastify-multipart'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p9f8-gqjf-m75j",
  "modified" : "2021-05-26T20:05:47Z",
  "published" : "2021-05-06T17:28:36Z",
  "aliases" : [ "CVE-2020-8136" ],
  "summary" : "Uncontrolled Resource Consumption in fastify-multipart",
  "details" : "Prototype pollution vulnerability in `fastify-multipart` < 1.0.5 allows an attacker to crash fastify applications parsing multipart requests by sending a specially crafted request.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fastify-multipart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8136"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/804772"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-05T22:07:09Z",
    "nvd_published_at" : "2020-03-20T19:15:00Z"
  }
}