@fastify/busboyの脆弱性、細工したアップロードで処理が止まりサービス妨害のおそれ
Summary
@fastify/busboyには、マルチパートのアップロードで最後のパートがスキップされると、リクエストが完了せず保留のまま残るサービス妨害(DoS)の脆弱性があります。影響するのは1.0.0から3.2.7より前の版で、3.2.7で修正されています。3.2.7以降へのアップデートを進めてください。完全な回避策は示されていないため、FastifyのhandlerTimeoutオプションで滞留時間を制限することも検討してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
@fastify/busboyには、マルチパートのアップロードで最後のパートがスキップされると、リクエストが完了せず保留のまま残るサービス妨害(DoS)の脆弱性があります。影響するのは1.0.0から3.2.7より前の版で、3.2.7で修正されています。3.2.7以降へのアップデートを進めてください。完全な回避策は示されていないため、FastifyのhandlerTimeoutオプションで滞留時間を制限することも検討してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| @fastify/busboy@fastify/busboy |
≥ 1.0.0, < 3.2.7→ 3.2.7 |
3.2.7 |
Original description The description as published by the source.
@fastify/busboy is a streaming parser for HTML form data, including multipart/form-data uploads, used by Fastify through @fastify/multipart. In versions from 1.0.0 before 3.2.7, when the final part of a multipart body is one the parser skips, such as a part with an invalid or missing Content-Disposition header or a part beyond a configured files, fields, or parts limit, and that part holds at least one stream buffer of data, the parser pauses the incoming write and never releases it because the closing delimiter has already been processed. The parser then emits neither a finish nor an error event, so the upload request never completes and stays pending even after the client disconnects. A single unauthenticated upload of about 67 KB is enough to leave a request hanging, and repeated requests can exhaust server resources, affecting any application that passes untrusted multipart/form-data to the parser directly or through @fastify/multipart. The issue is fixed in @fastify/busboy 3.2.7, and users should upgrade to 3.2.7 or later. There is no complete workaround, but setting Fastify's handlerTimeout option limits how long a stalled handler holds its resources.
Source: CVE.org (CVE Program・cvelistV5) NVD
References
- web github.com
- web cna.openjsf.org