{"id":6282,"date":"2025-08-20T10:04:25","date_gmt":"2025-08-20T10:04:25","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/08\/20\/coderabbits-production-servers-rce-vulnerability-enables-write-access-on-1m-repositories\/"},"modified":"2025-08-20T10:04:25","modified_gmt":"2025-08-20T10:04:25","slug":"coderabbits-production-servers-rce-vulnerability-enables-write-access-on-1m-repositories","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/08\/20\/coderabbits-production-servers-rce-vulnerability-enables-write-access-on-1m-repositories\/","title":{"rendered":"CodeRabbit\u2019s Production Servers RCE Vulnerability Enables Write Access on 1M Repositories"},"content":{"rendered":"<p>    CodeRabbit\u2019s Production Servers RCE Vulnerability Enables Write Access on 1M Repositories<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A critical remote code execution (RCE) vulnerability in CodeRabbit\u2019s production infrastructure that provided unauthorized access to over one million code repositories, including private ones.\u00a0<\/p>\n<p>The vulnerability, discovered in December 2024 and responsibly disclosed in January 2025, exploited the platform\u2019s static analysis tool integration to leak sensitive API credentials and gain write access to GitHub repositories through the compromised <a href=\"https:\/\/cybersecuritynews.com\/github-security-lab\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a> App private key.\u00a0<\/p>\n<pre class=\"wp-block-preformatted\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Key Takeaways<\/mark><\/strong><br>1. Malicious .rubocop.yml files executed arbitrary Ruby code on production servers.<br>2. Leaked GitHub App private key granted write access to 1M+ repositories.<br>3. CodeRabbit resolved issue within hours by disabling Rubocop and rotating all credentials.<\/pre>\n<p>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.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfPeaG-8e-23aaymTuO4xjPOmeCKapw9CJAP_ti_lJOD1VTlwa55Oz8pHXf7g7xdCE7yZGIyy3GfpYU2vluKr3MYXqRA-M-7Jh3lDEotkpiLzHH1GZElxLx-8y4hsvC6SBhEsbQ2w?key=TfK8wXXJ41afUTUkxt34Cg\" alt=\"1 million repositories in review\"><figcaption class=\"wp-element-caption\">1 million repositories in review<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"h-coderabbit-s-rubocop-integration-vulnerability\"><strong>CodeRabbit\u2019s Rubocop Integration Vulnerability<\/strong><\/h2>\n<p>Kudelski Security <a href=\"https:\/\/research.kudelskisecurity.com\/2025\/08\/19\/how-we-exploited-coderabbit-from-a-simple-pr-to-rce-and-write-access-on-1m-repositories\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">reports<\/a> that the vulnerability centered around CodeRabbit\u2019s integration with Rubocop, a Ruby static analyzer that processes .rubocop.yml configuration files submitted through pull requests.\u00a0<\/p>\n<p>Researchers discovered that Rubocop\u2019s 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.\u00a0<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdnLd49LUwbUQruF2RzOsB78vBIRyVzF-yB1kRrSkH8lN_D0lFkcsCYVTWZFfZNz6LxrgK9NcU4VPxO_3uBUVqdSTGf7w_TBkYjJwXzgu9g2SQYQKVSQ-1pO8mnNsJxtHtQfMTOiw?key=TfK8wXXJ41afUTUkxt34Cg\" alt=\"\u00a0Illustration of malicious pull request\u00a0\"><figcaption class=\"wp-element-caption\">\u00a0Illustration of malicious pull request\u00a0<\/figcaption><\/figure>\n<\/div>\n<p>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.\u00a0<\/p>\n<p>The payload utilized Ruby\u2019s 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.<\/p>\n<p>The successful exploitation yielded extensive access to CodeRabbit\u2019s production environment, including critical API keys for services such as Anthropic, <a href=\"https:\/\/cybersecuritynews.com\/chatgpt-app-ios\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenAI<\/a>, Langchain, and Pinecone, alongside PostgreSQL database credentials and encryption keys.\u00a0<\/p>\n<p>The most significant compromise involved the GITHUB_APP_PEM_FILE environment variable containing CodeRabbit\u2019s GitHub App private key, which granted write access to all repositories where users had installed the CodeRabbit application.\u00a0<\/p>\n<p>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\u2019s 1 million monitored repositories.\u00a0<\/p>\n<p>Using the PyGitHub library and the leaked app ID, attackers could programmatically enumerate installations, list accessible repositories, and clone private repositories, including CodeRabbit\u2019s internal repositories such as coderabbitai\/mono and coderabbitai\/pr-reviewer-saas.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-mitigations\"><strong>Mitigations<\/strong><\/h2>\n<p>The company disabled Rubocop processing entirely while developing a permanent fix and rotated all potentially<a href=\"https:\/\/cybersecuritynews.com\/github-users-login-credentials\/\" target=\"_blank\" rel=\"noreferrer noopener\"> compromised credentials<\/a> and API keys within hours of notification.\u00a0<\/p>\n<p>The permanent solution involved relocating Rubocop and other external tools into CodeRabbit\u2019s secure sandbox environment, which had existing isolation mechanisms that somehow excluded Rubocop from protection.\u00a0<\/p>\n<p>Additional security hardening measures included comprehensive system audits, automated sandbox enforcement mechanisms, and strengthened deployment gates to prevent similar incidents.\u00a0<\/p>\n<p>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.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong><code>Safely detonate suspicious files to uncover threats, enrich your investigations, and cut incident response time.\u00a0<a href=\"https:\/\/any.run\/demo?utm_source=li_csn&amp;utm_medium=post&amp;utm_campaign=safe_detonation&amp;utm_content=demo&amp;utm_term=180825\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Start with an\u00a0ANYRUN sandbox trial<\/a>\u00a0\u2192\u00a0<\/code><\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/coderabbits-production-servers-rce-vulnerability\/\">CodeRabbit\u2019s Production Servers RCE Vulnerability Enables Write Access on 1M Repositories<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Florence Nightingale<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/coderabbits-production-servers-rce-vulnerability\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CodeRabbit\u2019s Production Servers RCE Vulnerability Enables Write Access on 1M Repositories A critical remote code execution (RCE) vulnerability in CodeRabbit\u2019s production infrastructure that provided unauthorized access to over one million code repositories, including private ones.\u00a0 The vulnerability, discovered in December 2024 and responsibly disclosed in January 2025, exploited the platform\u2019s static analysis tool integration to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,131,648],"tags":[130],"class_list":["post-6282","post","type-post","status-publish","format-standard","hentry","category-cyber-security-news","category-vulnerability","category-vulnerability-news","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/6282"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=6282"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/6282\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=6282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=6282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=6282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}