CVE-2023-6840 Missing Authorization in GitLab
A maintainer can bypass security policies blocking merge requests by changing protected branch names in GitLab Enterprise Edition.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-6840?
CVE-2023-6840 is a medium-severity missing authorization vulnerability in Gitlab Gitlab, published on 7 Feb 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
An issue has been discovered in GitLab EE affecting all versions from 16.4 prior to 16.6.7, 16.7 prior to 16.7.5, and 16.8 prior to 16.8.2 which allows a maintainer to change the name of a protected branch that bypasses the security policy added to block MR.
Weakness: CWE-862
Which versions are affected by CVE-2023-6840?
1 open source package ship an affected version, including gitlab. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gitlab Bitnami | From 16.4.0 | 16.6.7, 16.7.5, 16.8.2 |
Products include Gitlab Gitlab.
How do I fix CVE-2023-6840?
Upgrade gitlab to a fixed version for your release line: 16.6.7, 16.7.5 or 16.8.2.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2023-6840 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-6840 exists.
Other vulnerabilities in Gitlab Gitlab
- CVE-2026-97229 GitLab Community Edition and Enterprise Edition Integer Overflow or Wraparound
- CVE-2026-85706 GitLab Community Edition and Enterprise Edition Path Traversal
- CVE-2023-7028 GitLab Community and Enterprise Editions Improper Access Control
- CVE-2021-22205 GitLab Community and Enterprise Editions Remote Code Execution
- CVE-2021-39935 GitLab Community and Enterprise Editions Server-Side Request Forgery (SSRF)
Sources
Also known as BIT-gitlab-2023-6840, GHSA-8jj6-7vgp-rg47, UBUNTU-CVE-2023-6840.