Protected-branch code injection via refs/replace
Published May 12, 2023 · Updated Jan 24, 2025
Improper access control in GitLab allows remote authenticated users to inject hidden code into protected branches through merge requests. GitLab accepts pushed refs/replace references, so the merge request UI reviews the original commit while the merge operation uses a substituted malicious commit. Developer access and a reviewer who merges the request are required; affected releases are before 15.9.8, 15.10.0 before 15.10.7, and 15.11.0 before 15.11.3.
Summary
What happened
Improper access control in GitLab allows remote authenticated users to inject hidden code into protected branches through merge requests. GitLab accepts pushed refs/replace references, so the merge request UI reviews the original commit while the merge operation uses a substituted malicious commit. Developer access and a reviewer who merges the request are required; affected releases are before 15.9.8, 15.10.0 before 15.10.7, and 15.11.0 before 15.11.3.
The record
- CVE
- CVE-2023-2181
- Published
- May 12, 2023
- Updated
- Jan 24, 2025
- Vendor
- GitLab
- Product
- GitLab
- Classifications
- T1565.001
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- May 12, 2023CVE publishedPublication date reported by the CVE source.
- Jan 24, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=>=15.10, <15.10.7
- Affected versionversion=>=15.11, <15.11.3
- Affected versionversion=<15.9.8
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Public refs/replace merge-request reproductionfunctional · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo