logoalt Hacker News

BadHost – CVE-2026-48710: Starlette Host-Header Auth Bypass

112 pointsby ylkyesterday at 9:07 AM41 commentsview on HN

https://arstechnica.com/information-technology/2026/05/milli...


Comments

magniotoday at 10:15 AM

Never, ever, ever transform URIs and paths by string manipulation. If you think pulling in a library for this is overkill, it is not.

(Lesson learned from trying to quickly write my own function to make ".." to go back one URL segment that took 3 hours and discovering the URI spec contradicts my intuition depending on whether the URI is a URL or filesystem path.)

show 1 reply
nickcwtoday at 7:37 AM

If you read the advisory and are wondering what starlette is, from it's web page: starlette is a lightweight ASGI framework/toolkit, which is ideal for building async web services in Python.

It's used a lot in the data heavy AI world for it's efficiency shipping large files. This includes lots and lots of production servers.

From the advisory: this includes LLM inference servers like vLLM, LLM proxy servers like LiteLLM, AI agent frameworks, MCP gateways, and custom APIs. MCP servers are especially at risk because the MCP spec mandates unauthenticated OAuth discovery endpoints, providing a reliable path for exploitation.

show 2 replies
noirscapetoday at 8:17 AM

If you're using nginx/apache/literally anything that does reverse proxying correctly, this shouldn't be a problem unless you're routing all traffic over default_server rules unstead of server_name (or the equivalent).

They should be stopping this attack at the door (even if only to clean out your logs from scraper door knocks), which is probably why it went unnoticed for years. I don't think anyone would be deploying {A,W}SGI servers on public facing ports these days. Even if only because SSL termination is much easier in the proxy layer.

Also good lord that ARS article is a mess. What the hell happened there? An ASGI server isn't unique to AI or anything, it's just a regular supply chain dependency. I kinda expect better from ARS on stuff like this.

show 2 replies
s2ltoday at 7:36 AM

From the link, on how the attack works:

An attacker can send a crafted request like GET /protected with a Host: example.com/health?x= header. The request will reach the /proteced path, but request.url would be https://example.com/health?x=/protected, and request.url.path would return /health instead of the real request path.

show 3 replies
ostif-derekyesterday at 9:57 AM

This is a bad one. Rating it a medium understates how hard it hits thousands of downstream projects and billions of installs. People need to patch asap. I'm normally against the "giving a bug a name, logo, and website" trope, but this one is getting poor patch rates because of it being rated a medium and landing right before a big American holiday weekend.

show 3 replies
BadBadJellyBeantoday at 3:58 PM

Is catchy name with domain and website for every vulnerability now the norm? I mean it's good that it was found but there have been a lot of vulnerability websites lately.

show 2 replies
0xbadcafebeetoday at 11:53 AM

I need to start some kind of public counter for major vulnerabilities that could have been prevented with a software building code. It's been ticking up a lot latey

burner420042today at 9:23 AM

Notably CVE-2026-48710 hasn't been added into cloud sec vuln catalogs quite yet. Since fastapi ~is starlette, expect the later half of this week / early next to be busy.

andrewstuarttoday at 8:07 AM

Setting aside this issue, Starlette is a really great web server.

If you do async python I strongly recommend it.

FastAPI is built on Starlette - to be honest I don’t see the point of the extra baggage - just use Starlette.

show 1 reply
jancitoday at 10:02 AM

path-based auth middleware is a bad practice IMHO

show 1 reply
reconapptoday at 4:15 PM

[dead]

jofzartoday at 10:11 AM

[flagged]

ylkyesterday at 9:15 AM

The URL was meant to be https://badhost.org, the site accidentally still has the old canonical meta tag.

onebluecloudtoday at 12:49 PM

[flagged]

reconapptoday at 12:00 PM

[flagged]

zuogltoday at 8:38 AM

[flagged]

Ozzie-Dtoday at 9:25 AM

[flagged]

nine_chtoday at 8:25 AM

[flagged]

dividendflowtoday at 8:41 AM

[dead]

phoronixrlytoday at 7:16 AM

[flagged]