Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2024-0402: Arbitrary File Write in GitLab CE/EE Workspaces

Published Jan 26, 2024 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.9Critical · v3.1
EPSS3.8%90th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
GitLab
IdentifiersCVE-2024-0402CWE-22 · Improper Limitation of a Pathname…

CVE-2024-0402 is a critical arbitrary file write vulnerability in GitLab Community Edition and Enterprise Edition Workspaces. It affects versions 16.0 through before 16.5.8, 16.6 through before 16.6.6, 16.7 through before 16.7.4, and 16.8 through before 16.8.1. The flaw allows an authenticated user to write files to arbitrary locations on the GitLab server during workspace creation. Available technical analysis indicates the issue is reachable through processing of workspace devfile content and involves insufficient restriction of file extraction paths in the devfile handling chain, enabling path traversal during archive decompression and resulting in server-side arbitrary file write.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows a low-privilege authenticated attacker to place attacker-controlled files at arbitrary locations on the GitLab server. This can be used to deploy webshells or other malware, overwrite sensitive files, obtain code execution or privileged shell access depending on the chosen target path, compromise the GitLab instance, and potentially facilitate data theft or further movement within the environment. Public technical discussion also describes practical escalation from file write to control of the GitLab host and administrative takeover of the GitLab application.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure of GitLab to untrusted users, especially any users able to create workspaces or commit to repositories used for workspace creation. Restrict access to the GitLab instance through VPN or zero-trust controls, disable open user sign-up where feasible, and increase monitoring for suspicious workspace creation activity and unexpected file modifications on the GitLab server. These measures only reduce exposure and do not eliminate the vulnerability; patching is required. Patching also does not remediate any prior compromise.

Remediation

Patch, then assume compromise.

Upgrade GitLab CE/EE to a fixed release. The issue is fixed in 16.5.8, 16.6.6, 16.7.4, and 16.8.1. GitLab indicated that 16.5.8 was a backport containing the fix for this vulnerability. Apply the vendor-supported patched version appropriate for the deployed branch after standard change validation.

Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GitLabGitlabapplication
FAQ

Frequently asked questions

Is CVE-2024-0402 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2024-0402 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2024-0402?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2024-0402, the earliest disclosed Mar 10, 2025.
Is there a patch for CVE-2024-0402?
Upgrade GitLab CE/EE to a fixed release. The issue is fixed in 16.5.8, 16.6.6, 16.7.4, and 16.8.1.
What products are affected by CVE-2024-0402?
Gitlab.
How severe is CVE-2024-0402?
CVE-2024-0402 has a CVSS v3.1 score of 9.9 (Critical) and an EPSS score of 3.8% (90th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+2 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.