CVE-2023-6840 Missing Authorization in GitLab

Medium 6.7 Published Updated

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.

PackageAffectedFixed in
gitlab BitnamiFrom 16.4.016.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.

All Gitlab Gitlab vulnerabilities

Sources

Also known as BIT-gitlab-2023-6840, GHSA-8jj6-7vgp-rg47, UBUNTU-CVE-2023-6840.

Is CVE-2023-6840 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free