Millions of AI agents imperiled by critical vulnerability in open source package

Post content hidden for low score. Show…

Fatesrider

Ars Legatus Legionis
25,377
Subscriptor
Millions of AI agents and tools around the world have been imperiled by a critical vulnerability that can allow hackers to breach the servers running them and make off with sensitive data and credentials to third-party accounts, a security researcher is warning.
Is it bad of me to have felt an acute rush of Schadenfreude over this?

The times create a certain amount of deviation in my moral compass lately so it's a kind of relevant question. Because that rush was huge.
 
Upvote
60 (80 / -20)
I'm going to poo poo people here in the comments going "Ah it clearly must have been vibe coded" was it? Starlet and FastAPI aren't old, but they aren't "spring chickens" ... A lot of MCPs that got built in the last 2 or 3 years probably pull in FastAPI just because it was ... well very fast to build REST APIs with it. Was the bug introduced by vibe coding or just pre-existing and a ton of REST APIs to control or serve tools and content for LLMs just happen to use it?
 
Upvote
147 (149 / -2)
Post content hidden for low score. Show…

wrecksdart

Ars Centurion
393
Subscriptor++
Starlette is the base of FastAPI and other widely used frameworks for building services in Python apps, as well as many others.
Two things that are true:
1) FastAPI is an extremely useful and popular python library that depends on Starlette
2) Codebases requiring FastAPI/ASGI can be for stuff that doesn't have anything to do with AI/LLMs or vibe coding.

The "oh_no_anyway.gif" comments are annoying and misplaced given this context, so maybe hold your fire on this one. I will be the first to agree that the slop-machines are very bad for all of us, but I would also say it's better to opine on the thoughts produced by XKCD's "Dependency" comic instead of rushing to performatively denigrate AI stuff just because this one package is used in concert with it.
 
Upvote
188 (193 / -5)
Post content hidden for low score. Show…
Post content hidden for low score. Show…
Can we please not make this a thing, Ars? Whenever a vulnerability comes up that has some sort of usage relating to AI, can we please not frame articles like "AI" the monolith is somehow solely responsible ?

This article - mostly the headline is clearly getting the users who don't understand what the dependencies are or how they can be utilized in a tizzy. This becoming a cliche...
 
Last edited:
Upvote
40 (62 / -22)

DeeplyUnconcerned

Ars Scholae Palatinae
1,137
Subscriptor++
I'm going to poo poo people here in the comments going "Ah it clearly must have been vibe coded" was it? Starlet and FastAPI aren't old, but they aren't "spring chickens" ... A lot of MCPs that got built in the last 2 or 3 years probably pull in FastAPI just because it was ... well very fast to build REST APIs with it. Was the bug introduced by vibe coding or just pre-existing and a ton of REST APIs to control or serve tools and content for LLMs just happen to use it?
I don't think "clearly must be", but at the same time "do the same basic thing two different ways within the same context for no obvious reason" is a thing that LLMs seem to routinely do.
 
Upvote
-8 (6 / -14)
I don't think "clearly must be", but at the same time "do the same basic thing two different ways within the same context for no obvious reason" is a thing that LLMs seem to routinely do.
Fair. Is that what happened here? I think this is just a pre-existing, old-fashioned human made vuln, and its just a very popular package that provides the very necessary plumbing for basically any kind of MCP or even simple CRUD App integrated with an LLM. The relationship is casual, not causal.
 
Upvote
64 (64 / 0)

azazel1024

Ars Legatus Legionis
15,174
Subscriptor
Is it bad of me to have felt an acute rush of Schadenfreude over this?

The times create a certain amount of deviation in my moral compass lately so it's a kind of relevant question. Because that rush was huge.
If so, then me too. I had a Nelson "Ha, ha" moment when I read the title. And it doubled down when I read the article. This DOES appear to be a very trivial to exploit, and should have been easy to discover before deployment, security hole.

And I can't help reading stuff about LLMs and "AI" agents and always thinking "move fast, break things, fix nothing, make nothing better".
 
Upvote
-18 (6 / -24)

HiggsForce

Ars Scholae Palatinae
687
Subscriptor
Here's one technical description of the vulnerability.

It's rather simple: instead of sticking example.com into the host header, Starlette lets you also put things like example.com/abc?bar= in there, which turns a fetch of /foo from example.com into a fetch of http://example.com/abc?bar=/foo.
 
Upvote
59 (59 / 0)

mg224

Ars Scholae Palatinae
1,376
Subscriptor
I don't think "clearly must be", but at the same time "do the same basic thing two different ways within the same context for no obvious reason" is a thing that LLMs seem to routinely do.

It’s also a thing lots of humans do too, when they’re naive young programmers without proper code review, or just not seeing the whole picture.

Edit to add: who hasn’t see cut and paste from stack overflow cause something like this?
 
Upvote
22 (22 / 0)
If so, then me too. I had a Nelson "Ha, ha" moment when I read the title. And it doubled down when I read the article. This DOES appear to be a very trivial to exploit, and should have been easy to discover before deployment, security hole.
So I mean the criticisms is on Starlette then? Like not to anthropomorphize these things, because its cringe, but are you red teaming every package, especially popular packages, you're pip installing? I'm not going to go so far as to criticize Ars for editorializing the title a bit but this exact same vuln would have been bad regardless of whether a lot of AI tooling was built on top of it. If this happened in flask, which is very popular still, but seems to not be the framework most LLMs reach for to build a REST API or MCP, it would still be very bad.
 
Last edited:
Upvote
19 (21 / -2)
I'm trying really hard to figure out why people think this vuln has anything to do with vibe coding or AI (aside from a lot of AI frameworks build on top of it — because it is simple and fast)

My website is written in FastAPI/Starlette (no auth, no problem). It's just a very popular framework.
I think if ars wants to avoid their own version of enshitification they should probably knock off the titles catering to the self proclaimed "luddite" tech poseur. It won't age well and it's sort of dishonest and agenda driven. In this case it's blatant reaching to everyone who has experience with these dependencies... And there are quite a few of us reading ars.
 
Upvote
-1 (19 / -20)
Post content hidden for low score. Show…

deadermeat

Smack-Fu Master, in training
69
Subscriptor
From a quick look at the change made in the fixed version (1.0.1) and blame on the affected file, it looks like Starlette has been trusting the host header like this for 8 years - i.e. since it was first released.
As this article points out, it's one layer in the tech stack assuming that other layers are doing the right thing and not defensively coding.
 
Upvote
53 (53 / 0)
Bad AI slop products are also from the same culture as the security-lax move-fast-and-break-things web development that created this bug though.
And when we see evidence this is the result of that then it will be relevant, but that's not how this article was framed.

This should have been an article catering to developers and sys admins informing us of a vulnerability. Instead it's yet another cliche anti AI article that's reaching to cater to a crowd of people who click on anything that relates to what outrages them. It's dishonest and the result is confusion and confirmation bias for those without the skill or authority to understand this isn't even about AI. It's agenda driven click bait crap and I'm concerned about this websites standards for reporting and writing.
 
Upvote
12 (22 / -10)

DeeplyUnconcerned

Ars Scholae Palatinae
1,137
Subscriptor++
From a quick look at the change made in the fixed version (1.0.1) and blame on the affected file, it looks like Starlette has been trusting the host header like this for 8 years - i.e. since it was first released.
As this article points out, it's one layer in the tech stack assuming that other layers are doing the right thing and not defensively coding.
Fair enough, I stand corrected.
 
Upvote
15 (15 / 0)

shodanbo

Wise, Aged Ars Veteran
112
Yup, move fast, break things and create huge security holes . . .

This may be more a function of the fact that Python is popular with the AI crowd.

Up until now Python has been more deeply embedded behind API Gateways that are likely to insulate the code from the internet. These gateways are likely built on top of battle tested platforms like NGNX, Apache, Netty and Spring Frameworks.

Pushing Python out in front means now its frameworks like FastAPI (Or Starlette's) turn to get pounded on until all the different ways of attacking open HTTP servers have been dealt with?
 
Upvote
11 (14 / -3)

adamsc

Ars Praefectus
4,289
Subscriptor++
I'm trying really hard to figure out why people think this vuln has anything to do with vibe coding or AI (aside from a lot of AI frameworks build on top of it — because it is simple and fast)

My website is written in FastAPI/Starlette (no auth, no problem). It's just a very popular framework.

I’m really disappointed in the spin Dan chose for this article. While it’s true that some AI code uses this, tons of purely-human authored code has it as well.
 
Upvote
42 (43 / -1)

djlena

Smack-Fu Master, in training
1
Fair. Is that what happened here? I think this is just a pre-existing, old-fashioned human made vuln, and its just a very popular package that provides the very necessary plumbing for basically any kind of MCP or even simple CRUD App integrated with an LLM. The relationship is casual, not causal.
just ask the hackers, I mean, the researchers. 😝 they dont care. it's still a basic ssrf that a human should have known was possible. its not even an injection prompt vuln.
 
Upvote
-1 (0 / -1)

edanaher

Seniorius Lurkius
46
Subscriptor++
Aside from the "why is this article about AI when it's actually a real problem affecting real web servers that competent people use", is it that hard to explain the actual issue? This paragraph from the disclosure explains it perfectly:

Starlette reconstructs request.url by concatenating the HTTP Host header with the request path and re-parsing the result. The Host value is not validated against the RFC 9112 / RFC 3986 grammar before reconstruction. A Host header containing /, ?, or # shifts the path, query, and fragment boundaries during re-parse, so request.url.path no longer matches the path the ASGI server actually received and routed against.
Remind me again why I bother reading security articles on ars instead of a mainstream newspaper? The quality seems to be converging, and not in the way I like.

(For less technical folks, a quick summary is that HTTP sends the hostname and path separately; e.g., www.example.com and /articles/thisone. But then they're combined and reparsed, so if you send a hostname of example.com/route and a path of /more, the framework will incorrectly pass it along as a host of example.com and a path of route/more.)
 
Upvote
31 (33 / -2)