CVE-2023-25576: @fastify/multipart Denial of Service Vulnerability
HIGHCVE-2023-25576 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @fastify/multipart libraries in the npm ecosystem. The issue involves denial of service due to unlimited number of parts. Remediation is available by upgrading affected packages to version 6.0.1, 7.4.1.
CVE-2023-25576 at a Glance
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).
How to Fix CVE-2023-25576
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.
npm install @fastify/multipart@6.0.1
npm install @fastify/multipart@7.4.1
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-2023-25576, 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 6.0.1), 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
CVE-2023-25576 Affected @fastify/multipart Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@fastify/multipart
|
npm |
< 6.0.1
|
6.0.1
|
|
@fastify/multipart
|
npm |
≥ 7.0.0
< 7.4.1
|
7.4.1
|
References
Frequently Asked Questions
What is CVE-2023-25576?
Which @fastify/multipart versions are affected?
What version fixes CVE-2023-25576?
Is @fastify/multipart affected?
What is the CVSS score of CVE-2023-25576?
What CWE is associated with CVE-2023-25576?
How can I check npm dependencies for CVE-2023-25576?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hpp2-2cr5-pf6g",
"modified" : "2023-02-14T21:49:55Z",
"published" : "2023-02-14T21:49:55Z",
"aliases" : [ "CVE-2023-25576" ],
"summary" : "Denial of service due to unlimited number of parts",
"details" : "### Impact\n\n* The multipart body parser accepts an unlimited number of file parts.\n* The multipart body parser accepts an unlimited number of field parts.\n* The multipart body parser accepts an unlimited number of empty parts as field\nparts.\n\n\n### Patches\n\nThis is fixed in v7.4.1 (for Fastify v4.x) and v6.0.1 (for Fastify v3.x).\n\n### Workarounds\n\nThere are no known workaround. \n\n### References\n\nReported at https://hackerone.com/reports/1816195.",
"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" : "6.0.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@fastify/multipart"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-multipart/security/advisories/GHSA-hpp2-2cr5-pf6g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25576"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-multipart/commit/85be81bedf5b29cfd9fe3efc30fb5a17173c1297"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/1816195"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/fastify/fastify-multipart"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-multipart/releases/tag/v6.0.1"
}, {
"type" : "WEB",
"url" : "https://github.com/fastify/fastify-multipart/releases/tag/v7.4.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-14T21:49:55Z",
"nvd_published_at" : "2023-02-14T16:15:00Z"
}
}