{"id":"CVE-2023-5226","state":"PUBLISHED","title":"Improper Control of Generation of Code ('Code Injection') in GitLab","description":"An issue has been discovered in GitLab affecting all versions before 16.4.3, all versions starting from 16.5 before 16.5.3, all versions starting from 16.6 before 16.6.1. Under certain circumstances, a malicious actor bypass prohibited branch checks using a specially crafted branch name to manipulate repository content in the UI.","publishedAt":"2023-12-01T07:01:43.131Z","updatedAt":"2026-08-14T04:13:26.916Z","severity":{"score":4.8,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N","source":"GitLab"},"assigner":"GitLab","products":["GitLab GitLab"],"affected":[{"vendor":"GitLab","product":"GitLab","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"16.4.3","versionType":"semver"},{"version":"16.5","status":"affected","lessThan":"16.5.3","versionType":"semver"},{"version":"16.6","status":"affected","lessThan":"16.6.1","versionType":"semver"}],"repo":"git://git@gitlab.com:gitlab-org/gitlab.git","cpes":["cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*"]}],"references":["https://gitlab.com/gitlab-org/gitlab/-/issues/426400","https://hackerone.com/reports/2173053"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/5xxx/CVE-2023-5226.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-5226","state":"PUBLISHED","datePublished":"2023-12-01T07:01:43.131Z","dateUpdated":"2026-08-14T04:13:26.916Z","assignerShortName":"GitLab","assignerOrgId":"ceab7361-8a18-47b1-92ba-4d7d25f6715a","dateReserved":"2023-09-27T13:01:23.089Z"},"containers":{"cna":{"title":"Improper Control of Generation of Code ('Code Injection') in GitLab","descriptions":[{"lang":"en","value":"An issue has been discovered in GitLab affecting all versions before 16.4.3, all versions starting from 16.5 before 16.5.3, all versions starting from 16.6 before 16.6.1. Under certain circumstances, a malicious actor bypass prohibited branch checks using a specially crafted branch name to manipulate repository content in the UI."}],"affected":[{"vendor":"GitLab","product":"GitLab","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"16.4.3","versionType":"semver"},{"version":"16.5","status":"affected","lessThan":"16.5.3","versionType":"semver"},{"version":"16.6","status":"affected","lessThan":"16.6.1","versionType":"semver"}],"repo":"git://git@gitlab.com:gitlab-org/gitlab.git","cpes":["cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*"]}],"references":[{"url":"https://gitlab.com/gitlab-org/gitlab/-/issues/426400","name":"GitLab Issue #426400","tags":["issue-tracking"]},{"url":"https://hackerone.com/reports/2173053","name":"HackerOne Bug Bounty Report #2173053","tags":["technical-description","exploit","permissions-required","broken-link"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE","baseScore":4.8,"baseSeverity":"MEDIUM"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","lang":"en","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitLab","orgId":"ceab7361-8a18-47b1-92ba-4d7d25f6715a","dateUpdated":"2026-08-14T04:13:26.916Z"},"solutions":[{"lang":"en","value":"Upgrade to versions 16.4.3, 16.5.3, 16.6.1 or above."}],"credits":[{"lang":"en","value":"Thanks [shells3c](https://hackerone.com/shells3c) for reporting this vulnerability through our HackerOne bug bounty program","type":"finder"}]},"adp":[{"title":"CVE Program Container","references":[{"url":"https://gitlab.com/gitlab-org/gitlab/-/issues/426400","name":"GitLab Issue #426400","tags":["issue-tracking","x_transferred"]},{"url":"https://hackerone.com/reports/2173053","name":"HackerOne Bug Bounty Report #2173053","tags":["technical-description","exploit","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T07:52:08.425Z"}}]}}}