@tsparticles/mcp-serverでリクエスト本文の無制限受信により遠隔からサービス停止される脆弱性
Summary
@tsparticles/mcp-serverのHTTPモードに、リクエスト本文のサイズ上限がないことによる脆弱性が見つかりました。遠隔の攻撃者が巨大なデータを送り続けるとプロセスのメモリが枯渇し、サービスが停止するおそれがあります。影響はバージョン4.3.1より前で、修正版の4.3.1で解消されています。公式のDocker構成でも影響を受けるため、早めに修正版へ更新してください。
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.
@tsparticles/mcp-serverのHTTPモードに、リクエスト本文のサイズ上限がないことによる脆弱性が見つかりました。遠隔の攻撃者が巨大なデータを送り続けるとプロセスのメモリが枯渇し、サービスが停止するおそれがあります。影響はバージョン4.3.1より前で、修正版の4.3.1で解消されています。公式のDocker構成でも影響を受けるため、早めに修正版へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| tsparticlestsparticles | — | Not listed |
| @tsparticlesmcp-server | — | Not listed |
| npm@tsparticles/mcp-server |
< 4.3.1→ 4.3.1 |
4.3.1 |
Original description The description as published by the source.
Summary
The HTTP server mode of @tsparticles/mcp-server accumulates all incoming request body chunks into an in-memory Buffer[] array with no size limit before calling JSON.parse. An unauthenticated remote attacker can stream an arbitrarily large body to POST /mcp, exhausting the Node.js process memory and causing a Denial of Service. The official Docker image ships with HTTP mode enabled by default (--port 3000 on 0.0.0.0), making this exploitable without any special configuration in containerized deployments.
Details
The vulnerability exists in integrations/mcp-server/src/index.ts at lines 399–407. The POST /mcp request handler resolves a Promise that pushes every incoming data chunk into a Buffer[] array without checking the cumulative size, a Content-Length header, or any other guard:
// integrations/mcp-server/src/index.ts:399-407
if (req.method === "POST" && req.url === "/mcp") {
const body = await new Promise((resolve, reject) => {
const chunks: Buffer[] = [];
req.on("data", (chunk) => chunks.push(Buffer.from(chunk))); // no size guard
req.on("end", () => resolve(Buffer.concat(chunks).toString("utf8")));
req.on("error", reject);
});
const parsedBody = body ? JSON.parse(body) : undefined;
The complete data flow leading to exploitation:
index.ts:390— HTTP server is created.index.ts:399—POST /mcpbranch is entered; no authentication is performed.index.ts:401-403— Every chunk is ap…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com