Starlette Vulnerability Enables Remote Code Execution via Host Header Manipulation
A critical vulnerability in Starlette versions before 1.0.1 allows attackers to exploit unvalidated Host headers for remote code execution without authentication, as demonstrated by Horizon3.ai.
AIVulnerabilitiesKey points
- Starlette versions before 1.0.1 are vulnerable to unvalidated Host header attacks.
- Attackers can exploit this flaw to achieve remote code execution without authentication.
- Horizon3.ai demonstrated how chaining vulnerabilities can lead to remote code execution.
- The vendor recommends updating to Starlette version 1.0.1 or later to fix the issue.
A recent analysis highlights a vulnerability in Starlette. The vulnerability, which affects versions of Starlette prior to 1.0.1, enables attackers to manipulate Host headers with characters like '/', '?', and '#' to bypass access control logic. Horizon3.ai published a detailed write-up showing how these vulnerabilities can be chained together for remote code execution. Attackers have been using odd Host headers such as 'localhost]', '[localhost' and 'litellm.proxy' to exploit the flaw. Exploitation of this issue was reported back in July. The vendor strongly recommends updating to Starlette version 1.0.1 or later to address the problem. Security experts emphasize that WAF rules should focus on detecting invalid hostname characters rather than specific exploit patterns. They also advise developers to validate data components before assembling complex entities and to prioritize reducing the attack surface to mitigate the growing number of vulnerabilities.
What to do
- Update Starlette to version 1.0.1 or later to address the vulnerability.
- Implement WAF rules that flag invalid hostname characters in Host headers.
- Validate Host headers before using them in URL construction to prevent exploitation.
- Monitor for unusual activity in web application logs that may indicate Host header manipulation.
Original report
“Scans for LiteLLM/Starlette (CVE-2026-42271, CVE-2026-48710), (Mon, Nov 16th)”
This weekend, we started seeing requests for /mcp-rest/test/tools/list hitting our honeypots. These requests appear to attempt to exploit CVE-2026-42271 and CVE-2026-48710. Horizon3.ai published a short write-up about how these vulnerabilities can be chained to achieve remote code execution without authentication [Horizon3]