Starlet before 0.33 for Perl has request-handling flaws
A large Content-Length can kill a worker, and chunked bodies from 0.20 can exhaust CPU.
Memory exhaustion DoS in Starlet before 0.33
Starlet for Perl reads a request body by calling sysread for the entire declared Content-Length at once. Perl grows that buffer before any data arrives, so a length larger than available memory makes the worker exit with an uncatchable out-of-memory error before the application runs. A remote attacker can force a worker restart with each request of a few bytes. Starlet versions before 0.33 are affected.
What to do: Upgrade Starlet to 0.33.
| Product | Affected | Fixed in |
|---|---|---|
| Starlet | before 0.33 | 0.33 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Starlet versions before 0.33 for Perl allow a request declaring a large Content-Length to kill a worker by exhausting memory. The request body is read in a loop that asks sysread for all of the remaining declared length at once. Perl grows the read buffer to that size before any data arrives, so a length larger than available memory makes the worker exit with an uncatchable out of memory error before the application is called. A remote attacker can force a worker restart with each request of a few bytes.
A large Content-Length can kill a worker, and chunked bodies from 0.20 can exhaust CPU.
Today 1.4K readers · 2.5K views · 1.9K reads · all time 160K views