Live data from Hacker News

How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

research.kudelskisecurity.com

31–40 of 244 posts

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#31
post #29

hey, this is Howon from CodeRabbit here. we wish to note that this RCE was reported and fixed in January. it was entirely prospective and no customer data was affected. we have extensive sandboxing for basically any execution of anything now, including any and every tool and all generated code of any kind under the CodeRabbit umbrella. if you want to learn how CodeRabbit does the isolation, here's a blog post about h…

How can you guarantee that nobody ripped the private key before the researcher told you about the issue though?

Or has a backdoor installed somewhere?

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#32

hey, this is Howon from CodeRabbit here. we wish to note that this RCE was reported and fixed in January. it was entirely prospective and no customer data was affected. we have extensive sandboxing for basically any execution of anything now, including any and every tool and all generated code of any kind under the CodeRabbit umbrella. if you want to learn how CodeRabbit does the isolation, here's a blog post about h…

But do you still store your GH API private key in environment variables?

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#33

I've noticed CodeRabbit at times does reviews that are super. It is able to catch bugs that even claude code misses on our Github PRs. Blows my mind at times tbh. Based on the env vars seems like they're using anthropic, openai, etc. only?

Interesting. We removed it as it was mostly too verbose, catching too many false positives and never really added anything useful.

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#35
I think that Security fuckups of this disastrous scale should get classified as "breaches" or "incidents" and be required to be publicly disclosed by the news media, in order to protect consumers.

Here is a tool with 7,000+ customers and access to 1 million code repositories which was breached with an exploit a clever 11 year old could created. (edit: 1 million repos, not customers)

When the exploit is so simple, I find it likely that bots or Black Hats or APTs had already found a way in and established persistence before the White Hat researchers reported the issue. If this is the case, patching the issue might prevent NEW bad actors from penetrating CodeRabbit's environment, but it might not evict any bad actors which might now be lurking in their environment.

I know Security is hard, but come on guys

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#37

global scoped installations or keys always scare me for this reason i believe the answer here was to exchange the token for something scoped to the specific repo coderabbit is running in, but alas, that doesn't remove the "RCE" _on_ the repo

They do that, this is how GH apps work. There is no reason to expose the app's private key in the environment for the code that actually runs on the PR.

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#38

hey, this is Howon from CodeRabbit here. we wish to note that this RCE was reported and fixed in January. it was entirely prospective and no customer data was affected. we have extensive sandboxing for basically any execution of anything now, including any and every tool and all generated code of any kind under the CodeRabbit umbrella. if you want to learn how CodeRabbit does the isolation, here's a blog post about h…

how do you know that no customer data was affected? did you work with github and scan all uses of your keys? how do you know if a use of your github key was authentic or not? did you check with anthroipic/openai/etc to scan logs usage?

It's really hard to trust a "hey we got this guys" statement after a fuckup this big

Re: How we exploited CodeRabbit: From simple PR to RCE and write access on 1M repos

#39
post #6

> After responsibly disclosing this critical vulnerability to the CodeRabbit team, we learned from them that they had an isolation mechanism in place, but Rubocop somehow was not running inside it. Curious what this (isolation mechanism) means if anyone knows.

What a lucky coincidence that the tool the researcher attacked because it allowed code execution was not sandboxed.
Post reply on HN