{"id":"CVE-2024-0402","state":"PUBLISHED","title":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in GitLab","description":"An issue has been discovered in GitLab CE/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 which allows an authenticated user to write files to arbitrary locations on the GitLab server while creating a workspace.","publishedAt":"2024-01-26T01:02:39.052Z","updatedAt":"2026-06-03T04:08:40.742Z","severity":{"score":9.9,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","source":"GitLab"},"assigner":"GitLab","products":["GitLab GitLab"],"affected":[{"vendor":"GitLab","product":"GitLab","defaultStatus":"unaffected","versions":[{"version":"16.0","status":"affected","lessThan":"16.5.8","versionType":"semver"},{"version":"16.6","status":"affected","lessThan":"16.6.6","versionType":"semver"},{"version":"16.7","status":"affected","lessThan":"16.7.4","versionType":"semver"},{"version":"16.8","status":"affected","lessThan":"16.8.1","versionType":"semver"}],"repo":"git://git@gitlab.com:gitlab-org/gitlab.git","cpes":["cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*"]}],"references":["https://about.gitlab.com/releases/2024/01/25/critical-security-release-gitlab-16-8-1-released/","https://gitlab.com/gitlab-org/gitlab/-/issues/437819"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/0xxx/CVE-2024-0402.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-0402","state":"PUBLISHED","datePublished":"2024-01-26T01:02:39.052Z","dateUpdated":"2026-06-03T04:08:40.742Z","assignerShortName":"GitLab","assignerOrgId":"ceab7361-8a18-47b1-92ba-4d7d25f6715a","dateReserved":"2024-01-10T16:30:43.698Z"},"containers":{"cna":{"title":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in GitLab","descriptions":[{"lang":"en","value":"An issue has been discovered in GitLab CE/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 which allows an authenticated user to write files to arbitrary locations on the GitLab server while creating a workspace."}],"affected":[{"vendor":"GitLab","product":"GitLab","defaultStatus":"unaffected","versions":[{"version":"16.0","status":"affected","lessThan":"16.5.8","versionType":"semver"},{"version":"16.6","status":"affected","lessThan":"16.6.6","versionType":"semver"},{"version":"16.7","status":"affected","lessThan":"16.7.4","versionType":"semver"},{"version":"16.8","status":"affected","lessThan":"16.8.1","versionType":"semver"}],"repo":"git://git@gitlab.com:gitlab-org/gitlab.git","cpes":["cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*"]}],"references":[{"url":"https://about.gitlab.com/releases/2024/01/25/critical-security-release-gitlab-16-8-1-released/"},{"url":"https://gitlab.com/gitlab-org/gitlab/-/issues/437819","name":"GitLab Issue #437819","tags":["issue-tracking"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.9,"baseSeverity":"CRITICAL"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitLab","orgId":"ceab7361-8a18-47b1-92ba-4d7d25f6715a","dateUpdated":"2026-06-03T04:08:40.742Z"},"solutions":[{"lang":"en","value":"Upgrade to versions 16.8.1, 16.7.4, 16.6.6, 16.5.8 or above."}],"credits":[{"lang":"en","value":"This vulnerability has been discovered internally by GitLab team member [joernchen](https://gitlab.com/joernchen)","type":"finder"}]},"adp":[{"title":"CVE Program Container","references":[{"url":"https://about.gitlab.com/releases/2024/01/25/critical-security-release-gitlab-16-8-1-released/","tags":["x_transferred"]},{"url":"https://gitlab.com/gitlab-org/gitlab/-/issues/437819","name":"GitLab Issue #437819","tags":["issue-tracking","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T18:04:49.576Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-06-03T18:01:24.319017Z","id":"CVE-2024-0402","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-06-03T18:01:33.069Z"}}]}}}