@middy/http-json-body-parser is vulnerable to Prototype Pollution
59
Medium Risk
The @middy/http-json-body-parser middleware parses incoming HTTP request bodies as JSON using a reviver that only stripped the __proto__ key. Request bodies using a constructor key with a nested prototype object bypass this filter, so prototype-polluting keys survive parsing. When the parsed body is later merged or copied by the application, this can corrupt object prototypes, leading to denial of service or altered application behavior. The fix rejects bodies containing __proto__ or constructor.prototype keys with an HTTP 422 error.
You are affected if you are using a version that falls within the vulnerable range.
@middy/http-json-body-parser is vulnerable to Prototype Pollution in versions 1.0.0 - 7.6.6.
Upgrade the @middy/http-json-body-parser library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant