Categories: Cyber Security News

CodeRabbit’s Production Servers RCE Vulnerability Enables Write Access on 1M Repositories

A critical remote code execution (RCE) vulnerability in CodeRabbit’s production infrastructure that provided unauthorized access to over one million code repositories, including private ones. 

The vulnerability, discovered in December 2024 and responsibly disclosed in January 2025, exploited the platform’s static analysis tool integration to leak sensitive API credentials and gain write access to GitHub repositories through the compromised GitHub App private key. 

Key Takeaways
1. Malicious .rubocop.yml files executed arbitrary Ruby code on production servers.
2. Leaked GitHub App private key granted write access to 1M+ repositories.
3. CodeRabbit resolved issue within hours by disabling Rubocop and rotating all credentials.

CodeRabbit, the most installed AI-assisted app on GitHub Marketplace with over 80,000 installations, quickly remediated the issue within hours of disclosure by disabling the vulnerable Rubocop integration and rotating all potentially compromised credentials.

1 million repositories in review

CodeRabbit’s Rubocop Integration Vulnerability

Kudelski Security reports that the vulnerability centered around CodeRabbit’s integration with Rubocop, a Ruby static analyzer that processes .rubocop.yml configuration files submitted through pull requests. 

Researchers discovered that Rubocop’s extension mechanism could be exploited by crafting a malicious configuration file containing a require: ./ext.rb directive, which would execute arbitrary Ruby code when CodeRabbit processed the pull request. 

Illustration of malicious pull request

The exploitation process involved creating a repository with three key files: a .rubocop.yml configuration file, a malicious ext.rb extension file containing payload code, and a dummy Ruby file to trigger Rubocop execution. 

The payload utilized Ruby’s environment variable access capabilities, specifically ENV.to_h, to exfiltrate sensitive data via HTTP POST requests to an attacker-controlled server at a designated IP address.

The successful exploitation yielded extensive access to CodeRabbit’s production environment, including critical API keys for services such as Anthropic, OpenAI, Langchain, and Pinecone, alongside PostgreSQL database credentials and encryption keys. 

The most significant compromise involved the GITHUB_APP_PEM_FILE environment variable containing CodeRabbit’s GitHub App private key, which granted write access to all repositories where users had installed the CodeRabbit application. 

This private key enabled attackers to generate access tokens with comprehensive permissions, including content read/write, metadata read, pull requests write, and repository administration capabilities across the platform’s 1 million monitored repositories. 

Using the PyGitHub library and the leaked app ID, attackers could programmatically enumerate installations, list accessible repositories, and clone private repositories, including CodeRabbit’s internal repositories such as coderabbitai/mono and coderabbitai/pr-reviewer-saas.

Mitigations

The company disabled Rubocop processing entirely while developing a permanent fix and rotated all potentially compromised credentials and API keys within hours of notification. 

The permanent solution involved relocating Rubocop and other external tools into CodeRabbit’s secure sandbox environment, which had existing isolation mechanisms that somehow excluded Rubocop from protection. 

Additional security hardening measures included comprehensive system audits, automated sandbox enforcement mechanisms, and strengthened deployment gates to prevent similar incidents. 

The vulnerability was completely resolved by January 30, 2025, demonstrating the critical importance of proper sandboxing for third-party tool integrations in CI/CD environments where untrusted code execution presents significant supply chain attack vectors.

Safely detonate suspicious files to uncover threats, enrich your investigations, and cut incident response time. Start with an ANYRUN sandbox trial → 

The post CodeRabbit’s Production Servers RCE Vulnerability Enables Write Access on 1M Repositories appeared first on Cyber Security News.

rssfeeds-admin

Recent Posts

Kevin Feige on Casting Robert Downey Jr. as Doctor Doom: ‘It’s Our Universe’

Marvel Studios mastermind Kevin Feige has opened up about the decision to bring Robert Downey…

25 minutes ago

Project Hail Mary Author Andy Weir Reveals the One Scene From the Book He Wishes Had Made It Into the Movie

Project Hail Mary author Andy Weir has revealed his “only regret” about the movie, confirming…

25 minutes ago

Slay the Spire 2 Roadmap Has No Release Dates So Dev Can Avoid ‘Sloppy Spire 2’

Slay the Spire 2 developer Mega Crit has published a detailed roadmap for Slay the…

2 hours ago

The Best Deals Today: Sony 4K OLED BRAVIA 8 TV, 4K Blu-ray Bundles, AirPods Pro 3, and More

A new weekend has arrived, and today, you can save big on the 4K Movies,…

3 hours ago

Resident Evil Requiem Mercenaries Rumors Heat Up After Alleged Leak

Resident Evil Requiem fans believe next month’s mysterious content update will add a new version…

4 hours ago

Wrestlemania 42: All of the Match Winners, Returns, and Surprises — Updating Live!

Wrestlemania 42 is finally here, and I’m here in Las Vegas at Allegiant Stadium to…

4 hours ago

This website uses cookies.