CVE-2024-9693 Overview
CVE-2024-9693 is an authorization flaw in GitLab Community Edition (CE) and Enterprise Edition (EE). The vulnerability allows unauthorized access to the Kubernetes agent in a cluster under specific configurations. It affects GitLab versions 16.0 through 17.3.6, 17.4 through 17.4.3, and 17.5 through 17.5.1. The weakness maps to [CWE-863] Incorrect Authorization. An attacker with low privileges and network access can compromise the confidentiality, integrity, and availability of clusters managed through the GitLab Kubernetes agent (agentk).
Critical Impact
Authenticated attackers can gain unauthorized access to Kubernetes agents in GitLab-managed clusters, enabling cluster control under specific configurations.
Affected Products
- GitLab CE/EE versions 16.0 through 17.3.6
- GitLab CE/EE versions 17.4 through 17.4.3
- GitLab CE/EE versions 17.5 through 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
The vulnerability resides in GitLab's Kubernetes integration through the GitLab agent for Kubernetes (agentk). The agent provides a secure connection between Kubernetes clusters and GitLab for GitOps workflows, CI/CD job execution, and cluster management. Under specific configurations, GitLab fails to enforce proper authorization checks when accessing the Kubernetes agent. This allows users with insufficient privileges to interact with the agent and the underlying cluster.
The issue is classified under [CWE-863] Incorrect Authorization, indicating the application performs an authorization check but uses an incorrect rule or set of conditions. Successful exploitation grants attackers access to cluster resources tied to the agent, potentially exposing workloads, secrets, and deployment pipelines.
Root Cause
The root cause is incorrect authorization logic governing access to the Kubernetes agent in GitLab projects and groups. The authorization layer does not consistently validate caller permissions against agent configurations. Specific configuration scenarios bypass the intended access boundaries between projects, agents, and clusters. As a result, GitLab grants agent access to identities that should be restricted from cluster operations.
Attack Vector
Exploitation requires network access to a GitLab instance and a low-privileged authenticated account. The attacker targets GitLab instances configured with the Kubernetes agent. By leveraging the flawed authorization checks, the attacker requests agent operations they should not be permitted to perform. This vector requires no user interaction and operates over standard GitLab API channels.
No public proof-of-concept exploit is currently available. See the GitLab Issue Discussion for technical details from the vendor.
Detection Methods for CVE-2024-9693
Indicators of Compromise
- Unexpected kas (Kubernetes Agent Server) connections or API calls in GitLab audit logs from users without legitimate cluster access.
- Kubernetes API requests originating from agentk for namespaces or resources outside the agent's documented scope.
- New or modified workloads, service accounts, or secrets in clusters connected to GitLab agents without corresponding GitOps commits.
Detection Strategies
- Review GitLab audit events for cluster_agent and agent_token activity, correlating against authorized project memberships and roles.
- Monitor Kubernetes API server audit logs for actions performed by service accounts associated with the GitLab agent and validate the originating GitLab user identity.
- Compare CI/CD job execution targeting clusters against project-level authorization to identify cross-project agent usage.
Monitoring Recommendations
- Enable GitLab audit logging at the instance level and forward events to a centralized SIEM for long-term retention and correlation.
- Track GitLab version metadata across the fleet to identify instances running affected releases prior to 17.3.7, 17.4.4, and 17.5.2.
- Alert on any kas authorization failures spikes, which may indicate enumeration attempts against the Kubernetes agent endpoint.
How to Mitigate CVE-2024-9693
Immediate Actions Required
- Upgrade GitLab CE/EE to version 17.3.7, 17.4.4, 17.5.2, or later as soon as possible.
- Rotate Kubernetes agent tokens (agent_token) for clusters connected to vulnerable GitLab instances.
- Audit project and group memberships for agents to ensure only intended principals retain access.
Patch Information
GitLab released fixed versions 17.3.7, 17.4.4, and 17.5.2 to address CVE-2024-9693. Self-managed GitLab administrators should apply the patches following the standard upgrade procedure. GitLab.com SaaS users receive the fix automatically. Reference the GitLab Issue Discussion for vendor remediation details.
Workarounds
- Restrict Kubernetes agent configurations to the minimum set of projects and groups required for operation.
- Apply Kubernetes RBAC policies that limit the agentk service account to specific namespaces and resource types.
- Temporarily disconnect non-essential GitLab Kubernetes agents until patching is complete.
# Verify GitLab version on self-managed instances
sudo gitlab-rake gitlab:env:info | grep "GitLab information" -A 10
# Upgrade GitLab on Omnibus (Debian/Ubuntu) to a patched release
sudo apt-get update && sudo apt-get install gitlab-ee=17.5.2-ee.0
# Rotate the Kubernetes agent token after upgrade
kubectl -n gitlab-agent delete secret <agent-token-secret>
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

