VDB
Sign up
MEDIUM5.3

GHSA-wqch-xfxh-vrr4

body-parser is vulnerable to denial of service when url encoding is used

Quick fix

GHSA-wqch-xfxh-vrr4 — body-parser: upgrade to the fixed version with the command below.

npm install body-parser@2.2.1

Details

### Impact

body-parser 2.2.0 is vulnerable to denial of service due to inefficient handling of URL-encoded bodies with very large numbers of parameters. An attacker can send payloads containing thousands of parameters within the default 100KB request size limit, causing elevated CPU and memory usage. This can lead to service slowdown or partial outages under sustained malicious traffic.

### Patches

This issue is addressed in version 2.2.1.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/body-parser
Introduced in: 2.2.0Fixed in: 2.2.1
Fixnpm install body-parser@2.2.1

References