Live data from Hacker News

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

research.kudelskisecurity.com

1–10 of 244 posts

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

#2
> While running the exploit, CodeRabbit would still review our pull request and post a comment on the GitHub PR saying that it detected a critical security risk, yet the application would happily execute our code because it wouldn’t understand that this was actually running on their production system.

What a bizarre world we're living in, where computers can talk about how they're being hacked while it's happening.

Also, this is pretty worrisome:

> Being quick to respond and remediate, as the CodeRabbit team was, is a critical part of addressing vulnerabilities in modern, fast-moving environments. Other vendors we contacted never responded at all, and their products are still vulnerable. [emphasis mine]

Props to the CodeRabbit team, and, uh, watch yourself out there otherwise!

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

#4
post #2

> While running the exploit, CodeRabbit would still review our pull request and post a comment on the GitHub PR saying that it detected a critical security risk, yet the application would happily execute our code because it wouldn’t understand that this was actually running on their production system. What a bizarre world we're living in, where computers can talk about how they're being hacked while it's happening. A…

Beautiful that CodeRabbit reviewed an exploit on its own system!

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

#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.

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

#7

I did not understand something: why did CodeRabbit run external tools on external code within its own set of environment variables? Why are these variables needed for this entire tooling?

presuming they take the output of running these linters and pass it for interpretation to Claude or OpenAI

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

#8

I did not understand something: why did CodeRabbit run external tools on external code within its own set of environment variables? Why are these variables needed for this entire tooling?

Their own tools would need the various API keys, of course, and they did build a method to filter out those variables and managed most user code through it, but it sounds like they forgot to put Rubocop through the special method.

So this researcher may have gotten lucky in choosing to dig into the tool that CodeRabbit got unlucky in forgetting.

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

#9
Unrelated to the article, but the first time I saw them was in a twitter ad with a completely comically bull** suggestion. I cannot take a company seriously that had something like that inside an ad that is supposed to show the best they're capable of.

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

#10
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.

> Curious what this (isolation mechanism) means if anyone knows.

If they're anything like the typical web-startup "developing fast but failing faster", they probably are using docker containers for "security isolation".

Post reply on HN