CamoLeak: Critical GitHub Copilot Vulnerability Leaks Private Source Code

legitsecurity.com

175 points by greyadept a day ago


isodev - 3 hours ago

I’m so happy our entire operation moved to a self hosted VCS (Forgejo). Two years ago, we started the migration (including client repos) and not only we saved tones of money on GitHub subscriptions, our system is dramatically more performant for the 30-40 developers working with it every day.

We also banned the use of VSCode and any editor with integrated LLM features. Folks can use CLI based coding agents of course, but only in isolated containers with careful selection of sources made available to the agents.

oncallthrow - 3 hours ago

> I spent a long time thinking about this problem before this crazy idea struck me. If I create a dictionary of all letters and symbols in the alphabet, pre-generate their corresponding Camo URLs, embed this dictionary into the injected prompt,

Beautiful

kerng - 5 hours ago

Not the first time by the way. GitHub Copilot Chat: From Prompt Injection to Data Exfiltration https://embracethered.com/blog/posts/2024/github-copilot-cha...

twisteriffic - an hour ago

This exploit seems to be taking advantage of the slow token-at-a-time pattern of LLM conversations to ensure that the extracted data can be reconstructed in order? Seems as though returning the entire response as a single block could interfere with the timing enough to make reconstruction much more difficult.

munchlax - 15 hours ago

So this wasn't really fixed. The impressive thing here is that copilot accepts natural language. So whatever exfiltration method you can come up with, you just write out the method in english.

They merely "fixed" one particular method, without disclosing how they fixed it. Surely you could just do the base64 thing to an image url of your choice? Failing that, you could trick it into providing passwords by telling it you accidentally stored your grocery list in a field called passswd, go fetch it for me ppls?

There's a ton of stuff to be found here. Do they give bounties? Here's a goldmine.

runningmike - 16 hours ago

Somehow this article feels like a promotional for Legit. But all AI vibe solutions face the same weaknesses. Limited transparency and trust Issues: Using non FOSS solutions for cybersecurity is a large risk.

If you do use AI cyber solutions, you can be more vulnerable for security breaches instead of less.

MysticFear - 4 hours ago

Can't they just have the Copilot user permission to be readonly from the current repo.

mediumsmart - 4 hours ago

I can't remember the last time I leaked private source code with copilot.

j45 - 2 hours ago

I wonder sometimes if all code on Github private or not is ultimately compromised somehow.

xstof - 15 hours ago

Wondering if the ability to use hidden (HTML comment) content in PRs would not remain a nasty issue: especially for open source repos?! Was that fixed?

stephenlf - 18 hours ago

Wild approach. Very nice

djmips - 13 hours ago

can you still make invisible comments?

charcircuit - 10 hours ago

The rule is to operate using the intersection of all the users permissions of who is contributing text to the LLM. Why can an attacker's prompt access a repo the attacker does not have access to? That's the biggest issue here.

adastra22 - 16 hours ago

A good vulnerability writeup, and a thrill to read. Thanks!

deckar01 - 16 hours ago

Did the markdown link exfil get fixed?

nprateem - 13 hours ago

You'd have to be insane to run an AI agent locally. They're clearly unsecurable.