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.
Regex CPU exhaustion in Starlet chunked decoding before 0.33
Starlet for Perl (0.20 before 0.33) can exhaust CPU while decoding chunked request bodies. A remote attacker, without authentication, sends a long run of hex digits, a bare line feed, then CRLF. The size-line pattern never matches and the engine retries once per digit, so time grows with the square of the run. Nothing caps the run, which can span several reads. One 128 KiB request can occupy a worker for about a minute before the application is called.
What to do: Upgrade Starlet to 0.33.
| Product | Affected | Fixed in |
|---|---|---|
| Starlet | 0.20 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 from 0.20 before 0.33 for Perl allow CPU exhaustion via regular expression backtracking when decoding chunked request bodies. A chunk-size line is matched as a run of hex digits, then .* and a CRLF. A run followed by a bare LF and then a CRLF can never match, and the engine retries the match once for each digit, so the time taken grows with the square of the run length. Nothing limits the length of the run, which can span several reads. A remote attacker can occupy a worker for about a minute of CPU time with one 128 KiB request, before the application is called.
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