Critical GitLab flaw allows account takeover without user interaction, patch quickly! (CVE-2023-7028)

A critical vulnerability in GitLab CE/EE (CVE-2023-7028) can be easily exploited by attackers to reset GitLab user account passwords.

While also vulnerable, users who have two-factor authentication enabled on their account are safe from account takeover.

CVE-2023-7028

“We have not detected any abuse of this vulnerability on platforms managed by GitLab, including GitLab.com and GitLab Dedicated instances. Self-managed customers can review their logs to check for possible attempts to exploit this vulnerability,” GitLab security engineer Greg Myers noted, and outlined what to look for.

About CVE-2023-7028

CVE-2023-7028 affects GitLab self-managed instances running GitLab Community Edition (CE) and Enterprise Edition (EE) versions:

  • 16.1 prior to 16.1.5
  • 16.2 prior to 16.2.8
  • 16.3 prior to 16.3.6
  • 16.4 prior to 16.4.4
  • 16.5 prior to 16.5.6
  • 16.6 prior to 16.6.4
  • 16.7 prior to 16.7.2

“The vulnerability was introduced in 16.1.0 on May 1, 2023,” Myers shared, after a change was made to allow users to reset their password through a secondary email address. “The vulnerability is a result of a bug in the email verification process.”

CVE-2023-7028 was reported through the company’s bug bounty program and has been fixed in GitLab CE and EE versions 16.7.2, 16.6.4, 16.5.6.

GitLab advises admins of self-managed GitLab instances to upgrade to a patched version immediately, and to enable 2FA for all GitLab accounts (and especially for administrator accounts).

“If your configuration allows a username and password to be used in addition to SSO [single sign-on] options, then you are impacted. Disabling password authentication via https://docs.gitlab.com/ee/administration/settings/sign_in_restrictions.html#password-authentication-enabled will mitigate the vulnerability for Self-Managed customers that have an external identity provider configured, as this will disable the ability to perform password reset,” they added.

GitLab.com is already running the patched version, and the company has instituted new security measures to prevent vulnerabilities such as CVE-2023-7028 to crop up in the future.

Other vulnerabilities fixed by GitLab

GitLab CE and EE versions 16.7.2, 16.6.4 and 16.5.6 are security releases that also carry fixes for several other vulnerabilities:

  • CVE-2023-5356, a critical bug caused by incorrect authorization checks, which may allow a user to abuse Slack/Mattermost integrations to execute slash commands as another user
  • CVE-2023-4812 could allow attackers to bypass the required CODEOWNERS approval by adding changes to a previously approved merge request
  • CVE-2023-6955, which may allow an attacker to create a workspace in one group that is associated with an agent from another group, and
  • CVE-2023-2030, which could allow an attacker to modify the metadata of signed commits.

UPDATE (January 15, 2024, 05:30 a.m. ET):

PoC exploits for CVE-2023-7028 have already been published.

UPDATE (January 25, 2024, 04:00 a.m. ET):

The Shadowserver Foundation has pinpointed 5379 internet-facing GitLab instances vulnerable to CVE-2023-7028.

Don't miss