CVE-2026-40561: Starlet versions through 0.31 for Perl allows HTTP Request Smuggling via Improper Header Precedence
Timothy Legge 03 May 2026 00:58 UTC
========================================================================
CVE-2026-40561 CPAN Security Group
========================================================================
CVE ID: CVE-2026-40561
Distribution: Starlet
Versions: through 0.31
MetaCPAN: https://metacpan.org/dist/Starlet
VCS Repo: https://github.com/kazuho/Starlet
Starlet versions through 0.31 for Perl allows HTTP Request Smuggling
via Improper Header Precedence
Description
-----------
Starlet versions through 0.31 for Perl allows HTTP Request Smuggling
via Improper Header Precedence.
Starlet incorrectly prioritizes "Content-Length" over
"Transfer-Encoding: chunked" when both headers are present in an HTTP
request. Per RFC 7230 3.3.3, Transfer-Encoding must take precedence.
An attacker could exploit this to smuggle malicious HTTP requests via a
front-end reverse proxy.
Problem types
-------------
- CWE-444 Inconsistent Interpretation of HTTP Requests ('HTTP
Request/Response Smuggling')
Workarounds
-----------
Migrate to Starman 0.4018 or later which has fixed this issue or apply
the patch.
References
----------
https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.3
https://github.com/kazuho/Starlet/commit/a7d5dfd1862aafa43e5eaca0fdb6acf4cc15b2d0.patch
Timeline
--------
- 2026-04-12: Issue identified
- 2026-04-28: Maintainer notified
- 2026-05-02: Determined that the issue was already public on GitHub
Credits
-------
CPANSec, finder