CVE-2024-9693 Overview
CVE-2024-9693 is an authorization bypass vulnerability discovered in GitLab CE/EE that affects all versions starting from 16.0 prior to 17.3.7, starting from 17.4 prior to 17.4.4, and starting from 17.5 prior to 17.5.2. This vulnerability could allow unauthorized access to the Kubernetes agent in a cluster under specific configurations, representing a significant security risk for organizations using GitLab's Kubernetes integration features.
The vulnerability is classified under CWE-863 (Incorrect Authorization), indicating that the application fails to properly verify that a user is authorized to perform a specific action when accessing Kubernetes agent resources.
Critical Impact
Attackers with low-privilege access could potentially gain unauthorized access to Kubernetes agents, enabling them to interact with connected Kubernetes clusters, potentially leading to full cluster compromise, data exfiltration, or service disruption.
Affected Products
- GitLab Community Edition (CE) versions 16.0 to 17.3.6
- GitLab Enterprise Edition (EE) versions 16.0 to 17.3.6
- GitLab CE/EE versions 17.4.0 to 17.4.3
- GitLab CE/EE versions 17.5.0 to 17.5.1
Discovery Timeline
- 2024-11-14 - CVE-2024-9693 published to NVD
- 2024-11-26 - Last updated in NVD database
Technical Details for CVE-2024-9693
Vulnerability Analysis
This authorization bypass vulnerability exists within GitLab's Kubernetes agent integration functionality. The Kubernetes agent for GitLab (agentk) provides a secure connection between GitLab and Kubernetes clusters, enabling features like pull-based deployments, cluster management, and CI/CD workflows. Under specific configurations, the authorization checks that should protect access to these agents fail to properly validate user permissions.
The vulnerability requires network access and authenticated user credentials to exploit. An attacker with low-privilege access to a GitLab instance could potentially bypass authorization controls to access Kubernetes agents they should not have access to. This could result in unauthorized operations against connected Kubernetes clusters, including deploying workloads, accessing secrets, or modifying cluster configurations.
Root Cause
The root cause of CVE-2024-9693 is an incorrect authorization implementation (CWE-863) within GitLab's Kubernetes agent access control mechanisms. The vulnerability stems from insufficient validation of user permissions when accessing Kubernetes agent resources under certain configuration scenarios. This allows users to interact with Kubernetes agents beyond their intended authorization scope.
Attack Vector
The attack vector for this vulnerability is network-based, requiring an authenticated user with low privileges. The exploitation path involves:
- An attacker authenticates to a vulnerable GitLab instance with a low-privilege account
- The attacker identifies Kubernetes agents configured within the GitLab instance
- Due to the authorization bypass, the attacker can access agent endpoints or resources they should not have permission to access
- Once unauthorized access is obtained, the attacker can potentially interact with the connected Kubernetes cluster
The vulnerability mechanism centers on the authorization logic that determines whether a user should have access to a specific Kubernetes agent. Under specific configurations, this check fails to properly restrict access, allowing unauthorized users to interact with agents associated with projects or groups they do not belong to. For detailed technical analysis, see the GitLab Issue Discussion.
Detection Methods for CVE-2024-9693
Indicators of Compromise
- Unexpected API calls to Kubernetes agent endpoints from users without proper project or group membership
- Anomalous access patterns to /api/v4/projects/:id/cluster_agents endpoints by unauthorized users
- Kubernetes agent access logs showing connections from users who should not have cluster access
- Audit logs indicating Kubernetes resource operations by unexpected user accounts
Detection Strategies
- Review GitLab audit logs for unauthorized access attempts to Kubernetes agent configurations
- Monitor Kubernetes API audit logs for operations initiated through GitLab agents by unexpected users
- Implement alerting for access to Kubernetes agent endpoints by users outside of expected groups or projects
- Correlate GitLab user activity with Kubernetes agent operations to identify suspicious patterns
Monitoring Recommendations
- Enable detailed audit logging for GitLab Kubernetes agent interactions
- Configure real-time alerts for Kubernetes agent access from unexpected IP addresses or user accounts
- Implement monitoring for changes to Kubernetes agent configurations or permissions
- Deploy SentinelOne Singularity platform to detect and respond to anomalous behavior patterns in your GitLab and Kubernetes infrastructure
How to Mitigate CVE-2024-9693
Immediate Actions Required
- Upgrade GitLab CE/EE to version 17.3.7, 17.4.4, or 17.5.2 or later immediately
- Audit all Kubernetes agent configurations and access patterns for signs of unauthorized access
- Review user permissions for Kubernetes agent access across all projects and groups
- Implement network segmentation to limit access to GitLab instances with Kubernetes integrations
- Enable comprehensive audit logging if not already configured
Patch Information
GitLab has released security patches addressing this vulnerability in the following versions:
| Version Branch | Patched Version |
|---|---|
| 17.3.x | 17.3.7 |
| 17.4.x | 17.4.4 |
| 17.5.x | 17.5.2 |
Organizations should upgrade to the latest patched version within their respective release branch. For detailed patch information and upgrade instructions, refer to the GitLab Issue Discussion.
Workarounds
- Restrict network access to GitLab instances to trusted IP ranges until patching is complete
- Disable Kubernetes agent integration temporarily if not critical to operations
- Implement additional authentication requirements for accessing Kubernetes-related GitLab features
- Review and tighten project and group membership to minimize potential attack surface
- Monitor Kubernetes agent activity closely using GitLab's built-in audit features
If immediate patching is not possible, administrators can restrict access to Kubernetes agent functionality by modifying GitLab's configuration:
# Temporary workaround: Restrict Kubernetes agent access via nginx
# Add to /etc/gitlab/gitlab.rb
nginx['custom_gitlab_server_config'] = "location ~ ^/api/v4/.*/cluster_agents {
allow 10.0.0.0/8; # Replace with your trusted network range
deny all;
}"
# Apply configuration changes
sudo gitlab-ctl reconfigure
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

