Google Gerrit Code Platform Vulnerability Exposes 18 Google Projects, Including ChromiumOS

Security researchers discovered a critical vulnerability (CVE-2025-1568) in Google’s Gerrit code-review system, allowing any registered user to inject malicious code into 18 high-profile projects, including ChromiumOS, Dart, and Bazel.

Dubbed GerriScary, this exploit chain combines three dangerous elements:

  • addPatchSet Overprivileging: Default permissions let external users modify existing code changes through Gerrit’s refs/for/* namespace
  • Label Persistence Flaws: Misconfigured Copy Conditions allowed automatic approval carryover to malicious patch sets1
  • Commit-Queue Race Exploit: 5-minute window to hijack automated merge bots after Commit-Queue+2 approvals
python# Example Gerrit permission configuration vulnerability
access "refs/for/*":
    label-Code-Review = -2..+2 group Registered Users
    submit = group Project Owners
    push = group Registered Users

2. Technical Breakdown:

The exploit leverages Gerrit’s project.config file misconfigurations through three-phase execution:

Phase 1: Initial Access

  1. Attacker registers a free Gerrit account via Google authentication
  2. Uses scrapers to identify submittable changes with status:submittable queries1

Phase 2: Payload Delivery

bash# Sample Gerrit API call to modify commit message (POC)
curl -X POST --header "Content-Type: application/json" \
-d '{"message":"Innocuous message with hidden payload"}' \
https://chromium-review.googlesource.com/changes/12345/message

Returns 209 status code confirming write permissions

Phase 3: Automated Compromise

  • Malicious patch sets inherit Code-Review+2 and Verified+1 labels via flawed Copy Conditions
  • Commit-Queue bots merge poisoned changes within 300 seconds of final approval

3. Impact & Mitigation:

Google patched configurations across affected repositories, but third-party Gerrit implementations remain vulnerable:

ProjectRisk Factor
ChromiumOSCritical1
BazelCritical1
DartHigh1
BoringSSLHigh1
Android-KVMHigh1
QuicheHigh1

Remediation Steps Implemented:

  • Disabled addPatchSet for Registered Users group in ChromiumOS
  • Updated label persistence rules to reset approvals on patch updates
  • Added manual review gates for Commit-Queue automation

Security teams using Gerrit must audit their project.config Files for similar permission structures and implement submit requirement validation workflows.

As open-source collaboration platforms expand, this incident underscores the importance of hardening CI/CD pipelines against permission escalation attacks.

Find this Story Interesting! Follow us on LinkedIn and X to Get More Instant Updates

AnuPriya
AnuPriya
Any Priya is a cybersecurity reporter at Cyber Press, specializing in cyber attacks, dark web monitoring, data breaches, vulnerabilities, and malware. She delivers in-depth analysis on emerging threats and digital security trends.

Recent Articles

Related Stories

LEAVE A REPLY

Please enter your comment!
Please enter your name here