{"id":"CVE-2024-0402","summary":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in GitLab","details":"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.","aliases":["BIT-gitlab-2024-0402"],"modified":"2026-10-30T10:46:45.218136101Z","published":"2024-01-26T01:02:39.052Z","database_specific":{"cna_assigner":"GitLab","cwe_ids":["CWE-22"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/0xxx/CVE-2024-0402.json"},"references":[{"type":"WEB","url":"https://about.gitlab.com/releases/2024/01/25/critical-security-release-gitlab-16-8-1-released/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/0xxx/CVE-2024-0402.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-0402"},{"type":"REPORT","url":"https://gitlab.com/gitlab-org/gitlab/-/issues/437819"},{"type":"PACKAGE","url":"git://git@gitlab.com:gitlab-org/gitlab.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://gitlab.com/gitlab-org/gitlab","events":[{"introduced":"280a09dbca836a6eedf5da1e63953fe8da44bf4c"},{"fixed":"52a7a8b5e226b1a0c2d2f7e240bb75dd3cc3b9b5"},{"introduced":"94991886af3e3820aa09fa353b29cf8557c93168"},{"fixed":"7da037032f0d42a455bbc7624c23bf64e637fb5e"},{"introduced":"9e7d34f7ff11405ece06ec398b66965d153cee6f"},{"fixed":"bb0e47b487a5af315a14e4060c5297c70b3d6f13"},{"introduced":"1e912d57d5a8f1135f4d41e25469069790134d41"},{"last_affected":"1e912d57d5a8f1135f4d41e25469069790134d41"}],"database_specific":{"extracted_events":[{"source":"CPE_RANGE","cpe":"cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*","range":[{"introduced":"16.0.0"},{"fixed":"16.5.8"}]},{"source":"CPE_RANGE","cpe":"cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*","range":[{"introduced":"16.0.0"},{"fixed":"16.5.8"}]},{"source":"CPE_RANGE","cpe":"cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*","range":[{"introduced":"16.6.0"},{"fixed":"16.6.6"}]},{"range":[{"introduced":"16.6.0"},{"fixed":"16.6.6"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*"},{"range":[{"introduced":"16.7.0"},{"fixed":"16.7.4"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*"},{"source":"CPE_RANGE","cpe":"cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*","range":[{"introduced":"16.7.0"},{"fixed":"16.7.4"}]},{"cpe":"cpe:2.3:a:gitlab:gitlab:16.8.0:*:*:*:community:*:*:*","range":[{"introduced":"16.8.0"},{"last_affected":"16.8.0"}],"source":"CPE_STRING"},{"source":"CPE_STRING","cpe":"cpe:2.3:a:gitlab:gitlab:16.8.0:*:*:*:enterprise:*:*:*","range":[{"introduced":"16.8.0"},{"last_affected":"16.8.0"}]}]}}],"versions":["16.8.0","v16.8.0-ee","v16.6.5-ee","v16.7.3-ee","v16.7.0-ee","v16.6.0-ee"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-0402.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"}]}