CVE-2024-6385 Overview
An issue was discovered in GitLab CE/EE affecting all versions starting from 15.8 prior to 16.11.6, starting from 17.0 prior to 17.0.4, and starting from 17.1 prior to 17.1.2, which allows an attacker to trigger a pipeline as another user under certain circumstances.
Critical Impact
This vulnerability allows unauthorized attackers to execute actions within GitLab as other users, potentially leading to significant data manipulation and system compromise.
Affected Products
- GitLab CE/EE 15.8.x < 16.11.6
- GitLab CE/EE 17.0.x < 17.0.4
- GitLab CE/EE 17.1.x < 17.1.2
Discovery Timeline
- Not Available - Vulnerability discovered by Not Available
- Not Available - Responsible disclosure to GitLab
- Not Available - CVE-2024-6385 assigned
- Not Available - GitLab releases security patch
- 2024-07-11 - CVE-2024-6385 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2024-6385
Vulnerability Analysis
The vulnerability is a result of improper access control which allows attackers to trigger a pipeline execution as another user without their consent. This can lead to unauthorized actions being performed in the victim's context.
Root Cause
The root cause lies in insufficient checks regarding user authentication leading to broken access control vulnerabilities.
Attack Vector
An attacker can exploit this vulnerability remotely over the network, requiring no privileges or user interaction, which makes it highly exploitable and dangerous.
// Example exploitation code (sanitized)
fetch('https://gitlab.example.com/api/v4/projects/1/trigger/pipeline', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'PRIVATE-TOKEN': 'attacker-access-token'
},
body: JSON.stringify({
ref: 'main'
})
})
.then(response => response.json())
.then(data => console.log(data));
Detection Methods for CVE-2024-6385
Indicators of Compromise
- Unauthorized pipeline executions
- Unusual user activity logs
- Unknown access tokens being used
Detection Strategies
Implement anomaly detection for user behavior analytics to identify deviations from normal user activity patterns and scrutinize pipeline trigger logs for any unauthorized access.
Monitoring Recommendations
Regularly monitor access logs and token usage within your GitLab environment. Enable audit logging to capture detailed user actions.
How to Mitigate CVE-2024-6385
Immediate Actions Required
- Update GitLab to the latest secure versions.
- Revoke and regenerate any exposed access tokens.
- Enhance logging and monitoring.
Patch Information
Refer to the vendor advisory for patch details and apply updates as soon as possible:
- GitLab CE/EE 16.11.6
- GitLab CE/EE 17.0.4
- GitLab CE/EE 17.1.2
Workarounds
Review and restrict the permissions for personal access tokens in use, and consider implementing IP restrictions for API access.
# Configuration example
# Restrict API access
location /api/ {
deny all;
allow 192.168.1.0/24;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

