guard-core is vulnerable to Uncontrolled Resource Consumption
53
Medium Risk
The penetration detector engine bounds how much request body it reads through a cap that is only enforced when a Content-Length header is present, and treats a missing header as under the cap. A request sent with Transfer-Encoding: chunked carries no Content-Length, so the check fails and the middleware reads the entire stream into memory and then decodes it to text. An unauthenticated client can send a large chunked body to any route the middleware covers and consume large amounts of server memory. The fix reads only a bounded prefix of bodies that lack a usable Content-Length and applies a wall-clock read timeout so the unbounded read no longer happens.
You are affected if penetration detection is enabled and any covered route is reachable by untrusted clients.
guard-core is vulnerable to Uncontrolled Resource Consumption in versions 0.0.1 - 3.11.0.
Upgrade the guard-core 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.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant