CVE-2024-0402
GitLab vulnerability analysis and mitigation

Overview

A critical vulnerability (CVE-2024-0402) was discovered in GitLab Community Edition (CE) and Enterprise Edition (EE) affecting all versions from 16.0 prior to 16.6.6, 16.7 prior to 16.7.4, and 16.8 prior to 16.8.1. The vulnerability allows an authenticated user to write files to arbitrary locations on the GitLab server while creating a workspace. This vulnerability has been assigned a CVSS score of 9.9 out of 10, indicating its critical severity (GitLab Advisory, NVD).

Technical details

The vulnerability is classified as a path traversal issue (CWE-22) that occurs during workspace creation. The flaw exists in the devfile parser implementation where the Ruby and Go parsers differ in handling YAML files, allowing crafted YAML content to bypass parent key validation in Ruby while being interpreted differently in Go. This implementation difference could lead to path traversal vulnerabilities when dealing with registry-based parents (GitLab Issue).

Impact

The vulnerability could allow authenticated users to write files to arbitrary locations on the GitLab server, potentially leading to code execution through mechanisms such as writing git hooks into repositories. On simple omnibus/docker installations where repositories are hosted on the same system, this could result in significant security compromises (Hacker News).

Exploitability

The vulnerability requires authentication to exploit, but can be triggered during workspace creation. The attack involves crafting specific YAML content that exploits parser differences between Ruby and Go implementations, potentially allowing for unauthorized file writes on the GitLab server (Security Online).

Mitigation and workarounds

GitLab has released security patches for all affected versions. Users are strongly recommended to upgrade to versions 16.5.8, 16.6.6, 16.7.4, or 16.8.1 immediately. GitLab.com and GitLab Dedicated environments have already been updated with the patched versions (GitLab Advisory).

Additional resources


SourceThis report was generated using AI

Related GitLab vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-19478CRITICAL9.4
  • GitLab logoGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesAug 17, 2026
CVE-2026-10053HIGH8.5
  • GitLab logoGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesAug 23, 2026
CVE-2026-19650HIGH7.1
  • GitLab logoGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesAug 17, 2026
CVE-2026-6821MEDIUM4.3
  • GitLab logoGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesAug 12, 2026
CVE-2026-4879MEDIUM4.3
  • GitLab logoGitLab
  • cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*
NoYesAug 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management