Summary
CVE-2026-87722 is a Denial of Service vulnerability in Gerrit Code Review caused by uncontrolled resource consumption when processing user-supplied regular expressions in search query predicates and REST filter endpoints. An unauthenticated, remote attacker can submit a crafted regular expression that exhausts JVM heap memory or pins CPU/request threads, degrading or crashing the Gerrit instance. The issue carries a CVSS score of 8.7 (High).
Technical details
- Root cause: regex-based search predicates (e.g., project, ref, and path regex filters) and certain REST filter endpoints compile attacker-supplied regular expressions into an automaton representation without bounding size or complexity, before access-control or index-visibility checks occur.
- Trigger condition: submitting a specially crafted regular expression (e.g., with excessive repetition or patterns causing exponential state expansion during compilation) to a regex-capable search or filter parameter.
- Attack vector: Network — the malicious query can be sent over HTTP(S) to the Gerrit web/REST interface; no authentication or user interaction is required.
- Impact: CPU starvation and JVM heap exhaustion/OutOfMemoryError, resulting in denial of service for the Gerrit instance; no confidentiality or integrity impact is reported.
Affected software
- Gerrit Code Review 2.1.6 through 3.12.9
- Gerrit Code Review 3.13.0 through 3.13.8
- Gerrit Code Review 3.14.0 through 3.14.2
Severity
- CVSS Score: 8.7 (High)
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Mitigation and recommended actions
- Immediate: Upgrade Gerrit Code Review to version 3.12.10, 3.13.9, or 3.14.3, depending on your current release line.
- If patching is not immediately possible: restrict network access to the Gerrit web/REST interface (e.g., via allow-listing, VPN, or reverse proxy access controls) to reduce exposure to untrusted, unauthenticated requests, and monitor for abnormal CPU/memory usage on Gerrit servers as an indicator of attempted exploitation.

