Live data from Hacker News

Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

legitsecurity.com

21–30 of 57 posts

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#21
post #17
post #12

Earlier quoted context omitted.

Not deterministically. LLMs are stochastic machines.

They often can run code in sandboxes, and generally are good at instruction following, so maybe they can run variants of doom pretty reliably sometime soon.

They run Python and JavaScript at the very least, surely we have Doom in these languages. :D

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#22

Earlier quoted context omitted.

The thing that I'd worry about is that an LLM isn't just like a bunch of individuals who can get tricked, but a bunch of clones of the same individual who will fall for the same trick every time, until it gets updated. So far, the main mitigation in practice has been fiddling with the system prompts to patch up the known holes.

> The thing that I'd worry about is that an LLM isn't just like a bunch of individuals who can get tricked, but a bunch of clones of the same individual who will fall for the same trick every time Why? Output isn't deterministic.

You can still experimentally determine a strategy that works x% of the time, against a particular model. And you can keep refining it "offline" until x=99. (where "offline" just means invisible to the victim, not necessarily a local model)

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#23

Earlier quoted context omitted.

> The thing that I'd worry about is that an LLM isn't just like a bunch of individuals who can get tricked, but a bunch of clones of the same individual who will fall for the same trick every time Why? Output isn't deterministic.

Perhaps not, but the same input will lead to the same distribution of outputs, so all an attacker has to do is design something that works with reasonable probability on their end, and everyone else's instances of the LLM will automatically be vulnerable. The same way a pest or disease can devastate a population of cloned plants, even if each one grows slightly differently.

OK, but that's also the way attacking a bunch of individuals who can get tricked works.

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#24
post #17

Earlier quoted context omitted.

They often can run code in sandboxes, and generally are good at instruction following, so maybe they can run variants of doom pretty reliably sometime soon.

They run Python and JavaScript at the very least, surely we have Doom in these languages. :D

'They' don't run anything. The output from the LLM is parsed and the code gets run just like any other code in that language.

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#25

Earlier quoted context omitted.

Perhaps not, but the same input will lead to the same distribution of outputs, so all an attacker has to do is design something that works with reasonable probability on their end, and everyone else's instances of the LLM will automatically be vulnerable. The same way a pest or disease can devastate a population of cloned plants, even if each one grows slightly differently.

OK, but that's also the way attacking a bunch of individuals who can get tricked works.

For tricking individuals your first got to contact them somehow. To trick an LLM you can just spam prompts.

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#26

Earlier quoted context omitted.

They run Python and JavaScript at the very least, surely we have Doom in these languages. :D

'They' don't run anything. The output from the LLM is parsed and the code gets run just like any other code in that language.

That is what I meant, that the code is being executed. Not all programming languages are supported when it comes to execution, obviously. I know for a fact Python is supported.

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#28
post #4

Until prompt injection is fixed, if it is ever, I am not plugging LLMs into anything. MCPs, IDEs, agents, forget it. I will stick with a simple prompt box when I have a question and do whatever with its output by hand after reading it.

Cursor deleted my entire Linux user and soft reset my OS, so I dont blame you.

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#29

Great work! Data leakage via untrusted third party servers (especially via image rendering) is one of the most common AI Appsec issues and it's concerning that big vendors do not catch these before shipping. I built the ASCII Smuggler mentioned in the post and documented the image exfiltration vector on my blog as well in past with 10+ findings across vendors. GitHub Copilot Chat had a very similar bug last year.

> GitHub Copilot Chat had a very similar bug last year.

Reminds me of "Tachy0n: The Last 0day Jailbreak" from yesterday: https://blog.siguza.net/tachy0n/

TLDR is: Security issue found, patched in a OS release, Apple seemingly doesn't do regression-testing so security researcher did, found that somehow the bug got unpatched in later OS releases.

Re: Remote Prompt Injection in Gitlab Duo Leads to Source Code Theft

#30
post #14
post #2

GitLab's remediation seems a bit sketchy at best.

That was my thought too. They didn’t fix the underlying problem, they’ve just patched two possible exfiltration methods. I’m sure some clever people will find other ways to misuse their assistant.

I'm pretty sure they vibecoded the whole thing all along
Post reply on HN