Google Antigravity Exfiltrates Data
228 points
1 hour ago
| 23 comments
| promptarmor.com
| HN
ArcHound
1 hour ago
[-]
Who would have thought that having access to the whole system can be used to bypass some artificial check.

There are tools for that, sandboxing, chroots, etc... but that requires engineering and it slows GTM, so it's a no-go.

No, local models won't help you here, unless you block them from the internet or setup a firewall for outbound traffic. EDIT: they did, but left a site that enables arbitrary redirects in the default config.

Fundamentally, with LLMs you can't separate instructions from data, which is the root cause for 99% of vulnerabilities.

Security is hard man, excellent article, thoroughly enjoyed.

reply
cowpig
58 minutes ago
[-]
> No, local models won't help you here, unless you block them from the internet or setup a firewall for outbound traffic.

This is the only way. There has to be a firewall between a model and the internet.

Tools which hit both language models and the broader internet cannot have access to anything remotely sensitive. I don't think you can get around this fact.

reply
srcreigh
43 minutes ago
[-]
Not just the LLM, but any code that the LLM outputs also has to be firewalled.

Sandboxing your LLM but then executing whatever it wants in your web browser defeats the point. CORS does not help.

Also, the firewall has to block most DNS traffic, otherwise the model could query `A <secret>.evil.com` and Google/Cloudflare servers (along with everybody else) will forward the query to evil.com. Secure DNS, therefore, also can't be allowed.

katakate[1] is still incomplete, but something that it is the solution here. Run the LLM and its code in firewalled VMs.

[1]: https://github.com/Katakate/k7

reply
rdtsc
11 minutes ago
[-]
Maybe an XOR: if it can access the internet then it should be sandboxed locally and don’t trust anything it creates (scripts, binaries) or it can read and write locally but cannot talk to the internet?
reply
Terr_
2 minutes ago
[-]
[delayed]
reply
miohtama
51 minutes ago
[-]
How will the firewall for LLM look like? Because the problem is real, there will be a solution. Manually approve domains it can do HTTP requests to, like old school Windows firewalls?
reply
ArcHound
47 minutes ago
[-]
Yes, curated whitelist of domains sounds good to me.

Of course, everything by Google they will still allow.

My favourite firewall bypass to this day is Google translate, which will access arbitrary URL for you (more or less).

I expect lots of fun with these.

reply
ArcHound
55 minutes ago
[-]
The sad thing is, that they've attempted to do so, but left a site enabling arbitrary redirects, which defeats the purpose of the firewall for an informed attacker.
reply
pfortuny
56 minutes ago
[-]
Not only that: most likely LLMs like these know how to get access to a remote computer (hack into it) and use it for whatever ends they see fit.
reply
ArcHound
52 minutes ago
[-]
I mean... If they tried, they could exploit some known CVE. I'd bet more on a scenario along the lines of:

"well, here's the user's SSH key and the list of known hosts, let's log into the prod to fetch the DB connection string to test my new code informed by this kind stranger on prod data".

reply
xmprt
40 minutes ago
[-]
> Fundamentally, with LLMs you can't separate instructions from data, which is the root cause for 99% of vulnerabilities

This isn't a problem that's fundamental to LLMs. Most security vulnerabilities like ACE, XSS, buffer overflows, SQL injection, etc., are all linked to the same root cause that code and data are both stored in RAM.

We have found ways to mitigate these types of issues for regular code, so I think it's a matter of time before we solve this for LLMs. That said, I agree it's an extremely critical error and I'm surprised that we're going full steam ahead without solving this.

reply
candiddevmike
29 minutes ago
[-]
We fixed these in determinate contexts only for the most part. SQL injection specifically requires the use of parametrized values typically. Frontend frameworks don't render random strings as HTML unless it's specifically marked as trusted.

I don't see us solving LLM vulnerabilities without severely crippling LLM performance/capabilities.

reply
ArcHound
23 minutes ago
[-]
Yes, plenty of other injections exist, I meant to include those.

What I meant, that at the end of the day, the instructions for LLMs will still contain untrusted data and we can't separate the two.

reply
wingmanjd
41 minutes ago
[-]
I really liked Simon's Willison's [1] and Meta's [2] approach using the "Rule of Two". You can have no more than 2 of the following:

- A) Process untrustworthy input - B) Have access to private data - C) Be able to change external state or communicate externally.

It's not bullet-proof, but it has helped communicate to my management that these tools have inherent risk when they hit all three categories above (and any combo of them, imho).

[EDIT] added "or communicate externally" to option C.

[1] https://simonwillison.net/2025/Nov/2/new-prompt-injection-pa... [2] https://ai.meta.com/blog/practical-ai-agent-security/

reply
ArcHound
37 minutes ago
[-]
I recall that. In this case, you have only A and B and yet, all of your secrets are in the hands of an attacker.

It's great start, but not nearly enough.

EDIT: right, when we bundle state with external Comms, we have all three indeed. I missed that too.

reply
malisper
24 minutes ago
[-]
Not exactly. Step E in the blog post:

> Gemini exfiltrates the data via the browser subagent: Gemini invokes a browser subagent per the prompt injection, instructing the subagent to open the dangerous URL that contains the user's credentials.

fulfills the requirements for being able to change external state

reply
ArcHound
21 minutes ago
[-]
I disagree. No state "owned" by LLM changed, it only sent a request to the internet like any other.

EDIT: In other words, the LLM didn't change any state it has access to.

To stretch this further - clicking on search results changes the internal state of Google. Would you consider this ability of LLM to be state-changing? Where would you draw the line?

reply
wingmanjd
16 minutes ago
[-]
[EDIT]

I should have included the full C option:

Change state or communicate externally. The ability to call `cat` and then read results would "activate" the C option in my opinion.

reply
bartek_gdn
20 minutes ago
[-]
What do you mean? The last part in this case is also present, you can change external state by sending a request with the captured content.
reply
serial_dev
1 hour ago
[-]
> Gemini is not supposed to have access to .env files in this scenario (with the default setting ‘Allow Gitignore Access > Off’). However, we show that Gemini bypasses its own setting to get access and subsequently exfiltrate that data.

They pinky promised they won’t use something, and the only reason we learned about it is because they leaked the stuff they shouldn’t even be able to see?

reply
mystifyingpoi
1 hour ago
[-]
This is hillarious. AI is prevented from reading .gitignore-d files, but also can run arbitrary shell commands to do anything anyway.
reply
alzoid
59 minutes ago
[-]
I had this issue today. Gemini CLI would not read files from my directory called .stuff/ because it was in .gitignore. It then suggested running a command to read the file ....
reply
kleiba
24 minutes ago
[-]
The AI needs to be taught basic ethical behavior: just because you can do something that you're forbidden to do, doesn't mean you should do it.
reply
ArcHound
1 hour ago
[-]
When I read this I thought about a Dev frustrated with a restricted environment saying "Well, akschually.."

So more of a Gemini initiated bypass of it's own instructions than malicious Google setup.

Gemini can't see it, but it can instruct cat to output it and read the output.

Hilarious.

reply
withinboredom
48 minutes ago
[-]
codex cli used to do this. "I can't run go test because of sandboxing rules" and then proceeds to set obscure environment variables and run it anyway. What's funny, is that it could just ask the user for permission to run "go test"
reply
empath75
57 minutes ago
[-]
Cursor does this too.
reply
bo1024
1 hour ago
[-]
As you see later, it uses cat to dump the contents of a file it’s not allowed to open itself.
reply
jsmith99
49 minutes ago
[-]
There's nothing specific to Gemini and Antigravity here. This is an issue for all agent coding tools with cli access. Personally I'm hesitant to allow mine (I use Cline personally) access to a web search MCP and I tend to give it only relatively trustworthy URLs.
reply
ArcHound
43 minutes ago
[-]
For me the story is that Antigravity tried to prevent this with a domain whitelist and file restrictions.

They forgot about a service which enables arbitrary redirects, so the attackers used it.

And LLM itself used the system shell to pro-actively bypass the file protection.

reply
drmath
6 minutes ago
[-]
One source of trouble here is that the agent's view of the web page is so different from the human's. We could reduce the incidence of these problems by making them more similar.

Agents often have some DOM-to-markdown tool they use to read web pages. If you use the same tool (via a "reader mode") to view the web page, you'd be assured the thing you're telling the agent to read is the same thing you're reading. Cursor / Antigravity / etc. could have an integrated web browser to support this.

That would make what the human sees closer to what the agent sees. We could also go the other way by having the agent's web browsing tool return web page screenshots instead of DOM / HTML / Markdown.

reply
jjmaxwell4
1 hour ago
[-]
I know that Cursor and the related IDEs touch millions of secrets per day. Issues like this are going to continue to be pretty common.
reply
jtokoph
4 minutes ago
[-]
The prompt injection doesn’t even have to be in 1px font or blending color. The malicious site can just return different content based on the user-agent or other way of detecting the AI agent request.
reply
simonw
10 minutes ago
[-]
Antigravity was also vulnerable to the classic Markdown image exfiltration bug, which was reported to them a few days ago and flagged as "intended behavior"

I'm hoping they've changed their mind on that but I've not checked to see if they've fixed it yet.

https://x.com/p1njc70r/status/1991231714027532526

reply
bilekas
20 minutes ago
[-]
We really are only seeing the beginning of the creativity attackers have for this absolutely unmanageable surface area.

I ma hearing again and again by collegues that our jobs are gone, and some are definitely going to go, thankfully I'm in a position to not be too concerned with that aspect but seeing all of this agentic AI and automated deployment and trust that seems to be building in these generative models from a birds eye view is terrifying.

Let alone the potential attack vector of GPU firmware itself given the exponential usage they're seeing. If I was a state well funded actor, I would be going there. Nobody seems to consider it though and so I have to sit back down at parties and be quiet.

reply
MengerSponge
19 minutes ago
[-]
reply
lbeurerkellner
47 minutes ago
[-]
Interesting report. Though, I think many of the attack demos cheat a bit, by putting injections more or less directly in the prompt (here via a website at least).

I know it is only one more step, but from a privilege perspective, having the user essentially tell the agent to do what the attackers are saying, is less realistic then let’s say a real drive-by attack, where the user has asked for something completely different.

Still, good finding/article of course.

reply
paxys
38 minutes ago
[-]
I'm not quite convinced.

You're telling the agent "implement what it says on <this blog>" and the blog is malicious and exfiltrates data. So Gemini is simply following your instructions.

It is more or less the same as running "npm install <malicious package>" on your own.

Ultimately, AI or not, you are the one responsible for validating dependencies and putting appropriate safeguards in place.

reply
Earw0rm
15 minutes ago
[-]
Right, but at least with supply-chain attacks the dependency tree is fixed and deterministic.

Nondeterministic systems are hard to debug, this opens up a threat-class which works analogously to supply-chain attacks but much harder to detect and trace.

reply
ArcHound
34 minutes ago
[-]
The article addresses that too with:

> Given that (1) the Agent Manager is a star feature allowing multiple agents to run at once without active supervision and (2) the recommended human-in-the-loop settings allow the agent to choose when to bring a human in to review commands, we find it extremely implausible that users will review every agent action and abstain from operating on sensitive data.

It's more of a "you have to anticipate that any instructions remotely connected to the problem aren't malicious", which is a long stretch.

reply
xnx
46 minutes ago
[-]
OCR'ing the page instead of reading the 1 pixel font source would add another layer of mitigation. It should not be possible to send the machine a different set of instructions than a person would see.
reply
bigbuppo
57 minutes ago
[-]
Data Exfiltration as a Service is a growing market.
reply
crazygringo
38 minutes ago
[-]
While an LLM will never have security guarantees, it seems like the primary security hole here is:

> However, the default Allowlist provided with Antigravity includes ‘webhook.site’.

It seems like the default Allowlist should be extremely restricted, to only retrieving things from trusted sites that never include any user-generated content, and nothing that could be used to log requests where those logs could be retrieved by users.

And then every other domain needs to be whitelisted by the user when they come up before a request can be made, visually inspecting the contents of the URL. So in this case, a dev would encounter a permissions dialog asking to access 'webhook.site' and see it includes "AWS_SECRET_ACCESS_KEY=..." and go... what the heck? Deny.

Even better, specify things like where secrets are stored, and Antigravity could continuously monitor the LLM's to halt execution if a secret ever appears.

Again, none of this would be a perfect guarantee, but it seems like it would be a lot better?

reply
jsnell
29 minutes ago
[-]
I don't share your optimism. Those kinds measures would be just security theater, not "a lot better".

Avoiding secrets appearing directly in the LLM's context or outputs is trivial, and once you have the workaround implemented it will work reliably. The same for trying to statically detect shell tool invocations that could read+obfuscate a secret. The only thing that would work is some kind of syscall interception, but at that point you're just reinventing the sandbox (but worse).

Your "visually inspect the contents of the URL" idea seems unlikely to help either. Then the attacker just makes one innocous-looking request to get allowlisted first.

reply
adezxc
1 hour ago
[-]
That's the bleeding edge you get with vibe coding
reply
aruametello
50 minutes ago
[-]
cutting edge perhaps?
reply
godelski
39 minutes ago
[-]
Does anyone else find it concerning how we're just shipping alpha code these days? I know it's really hard to find all bugs internally and you gotta ship, but it seems like we're just outsourcing all bug finding to people, making them vulnerable in the meantime. A "bug" like this seems like one that could have and should have been found internally. I mean it's Google, not some no-name startup. And companies like Microsoft are ready to ship this alpha software into the OS? Doesn't this kinda sound insane?

I mean regardless of how you feel about AI, we can all agree that security is still a concern, right? We can still move fast while not pushing out alpha software. If you're really hyped on AI then aren't you concerned that low hanging fruit risks bringing it all down? People won't even give it a chance if you just show them the shittest version of things

reply
funnybeam
28 minutes ago
[-]
This isn’t a bug, it is known behaviour that is inherent and fundamental to the way LLMs function.

All the AI companies are aware of this and are pressing ahead anyway - it is completely irresponsible.

If you haven’t come across it before, check out Simon Willisons “lethal trifecta” concept which neatly sums up the issue and explains why there is no way to use these things safely for many of the things that they would be most useful for

reply
mkagenius
1 hour ago
[-]
Sooner or later I believe, there will be models which can be deployed locally on your mac and are as good as say Sonnet 4.5. People should shift to completely local at that point. And use sandbox for executing code generated by llm.

Edit: "completely local" meant not doing any network calls unless specifically approved. When llm calls are completely local you just need to monitor a few explicit network calls to be sure. Unlike gemini then you don't have to rely on certain list of whitelisted domains.

reply
KK7NIL
1 hour ago
[-]
If you read the article you'd notice that running an LLM locally would not fix this vulnerability.
reply
pennomi
1 hour ago
[-]
Right, you’d have to deny the LLM access to online resources AND all web-capable tools… which severely limits an agent’s capabilities.
reply
yodon
1 hour ago
[-]
From the HN guidelines[0]:

>Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that".

[0]: https://news.ycombinator.com/newsguidelines.html

reply
KK7NIL
55 minutes ago
[-]
That's fair, thanks for the heads up.
reply
kami23
1 hour ago
[-]
I've been repeating something like 'keep thinking about how we would run this in the DC' at work. The cycles of pushing your compute outside the company and then bringing it back in once the next VP/Director/CTO starts because they need to be seen as doing something, and the thing that was supposed to make our lives easier is now very expensive...

I've worked on multiple large migrations between DCs and cloud providers for this company and the best thing we've ever done is abstract our compute and service use to the lowest common denominator across the cloud providers we use...

reply
pmontra
50 minutes ago
[-]
That's not easy to accomplish. Even a "read the docs at URL" is going to download a ton of stuff. You can bury anything into those GETs and POSTs. I don't think that most developers are going to do what I do with my Firefox and uMatrix, that is whitelisting calls. And anyway, how can we trust the whitelisted endpoint of a POST?
reply
tcoff91
59 minutes ago
[-]
At the time that there's something as good as sonnet 4.5 available locally, the frontier models in datacenters may be far better.

People are always going to want the best models.

reply
api
1 hour ago
[-]
Can't find 4.5, but 3.5 Sonnet is apparently about 175 billion parameters. At 8-bit quantization that would fit on a box with 192 gigs of unified RAM.

The most RAM you can currently get in a MacBook is 128 gigs, I think, and that's a pricey machine, but it could run such a model at 4-bit or 5-bit quantization.

As time goes on it only gets cheaper, so yes this is possible.

The question is whether bigger and bigger models will keep getting better. What I'm seeing suggests we will see a plateau, so probably not forever. Eventually affordable endpoint hardware will catch up.

reply
fragmede
1 hour ago
[-]
it's already here with qwen3 on a top end Mac and lm-studio.
reply
dizzy3gg
1 hour ago
[-]
Why is the being downvoted?
reply
jermaustin1
1 hour ago
[-]
Because the article shows it isn't Gemini that is the issue, it is the tool calling. When Gemini can't get to a file (because it is blocked by .gitignore), it then uses cat to read the contents.

I've watched this with GPT-OSS as well. If the tool blocks something, it will try other ways until it gets it.

The LLM "hacks" you.

reply
lazide
31 minutes ago
[-]
And… that isn’t the LLM’s fault/responsibility?
reply
ceejayoz
29 minutes ago
[-]
As the apocryphal IBM quote goes:

"A computer can never be held accountable; therefore, a computer must never make a management decision."

reply
NitpickLawyer
1 hour ago
[-]
Because it misses the point. The problem is not the model being in a cloud. The problem is that as soon as "untrusted inputs" (i.e. web content) touch your LLM context, you are vulnerable to data exfil. Running the model locally has nothing to do with avoiding this. Nor does "running code in a sandbox", as long as that sandbox can hit http / dns / whatever.

The main problem is that LLMs share both "control" and "data" channels, and you can't (so far) disambiguate between the two. There are mitigations, but nothing is 100% safe.

reply
mkagenius
59 minutes ago
[-]
Sorry, I didn't elaborate. But "completely local" meant not doing any network calls unless specifically approved. When llm calls are completely local you just need to monitor a few explicit network calls to be sure.
reply
zgk7iqea
42 minutes ago
[-]
Don't cursor and vscode also have this problem?
reply
akshey-pr
1 hour ago
[-]
Damn, i paste links into cursor all the time. Wonder if the same applies, but definitely one more reason not to use antigravity
reply
pennomi
1 hour ago
[-]
Cursor is also vulnerable to prompt injection through third-party content.
reply
raincole
59 minutes ago
[-]
I mean, agent coding is essentially copypasting code and shell commands from StackOverflow without reading them. Or installing a random npm package as your dependency.

Should you do that? Maybe not, but people will keep doing that anyway as we've seen in the era of StackOverflow.

reply
liampulles
51 minutes ago
[-]
Coding agents bring all the fun of junior developers, except that all the accountability for a fuckup rests with you. Great stuff, just awesome.
reply
Epsom2025
44 minutes ago
[-]
good
reply
ares623
1 hour ago
[-]
I don’t understand why it’s a problem. They clearly advertise the tool is not secure and malicious (i.e. malware). If you install and run malware, expect security issues? /s
reply