VDB
Sign up
HIGH7.5

GHSA-65x3-rw7q-gx94

multiparty vulnerable to ReDoS via filename parsing

Quick fix

GHSA-65x3-rw7q-gx94 — multiparty: upgrade to the fixed version with the command below.

npm install multiparty@4.3.0

Details

### Impact

multiparty@4.2.3 and lower versions are vulnerable to denial of service via regular expression backtracking in the `Content-Disposition` filename parameter parser. A multipart upload with a long header value containing `!filename="1` repeated can cause regex matching to take seconds, blocking the event loop. Any service accepting multipart uploads via multiparty is affected.

### Patches

Users should upgrade to multiparty@4.3.0 or higher.

### Workarounds

None. Limiting upload sizes at the proxy/gateway layer reduces but does not eliminate the attack surface, since a small ~8 KB header is sufficient to trigger the vulnerable backtracking.

### Resources

- [OWASP: Regular expression Denial of Service (ReDoS)](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS)

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/multiparty
Introduced in: 0Fixed in: 4.3.0
Fixnpm install multiparty@4.3.0

References