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).

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-2025-9222HIGH8.7
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesJan 09, 2026
CVE-2025-11224HIGH7.7
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesJan 14, 2026
CVE-2026-0723HIGH7.4
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesJan 20, 2026
CVE-2025-13781MEDIUM6.5
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesJan 09, 2026
CVE-2025-3950LOW3.5
  • GitLabGitLab
  • cpe:2.3:a:gitlab:gitlab
NoYesJan 09, 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