A vulnerability in GitLab’s email verification process could allow attackers to hijack the password reset process.
The issue, tracked as CVE-2023-7028 (CVSS score of 10) and introduced in GitLab 16.1.0, can be exploited to have password reset messages sent to an unverified email address.
GitLab 16.1.0 was released with the option to have password reset emails sent to a secondary email address, to prevent cases where users could not reset their passwords because they did not have access to the primary email inbox.
However, a bug in the email verification process could allow password reset messages to be sent to email addresses that have not been verified, essentially allowing attackers to hijack the password reset process and potentially take over accounts.
The issue impacts all user accounts that allow logins with usernames and passwords, even those that also have SSO options, GitLab explains in its advisory.
Accounts that have two-factor authentication (2FA) enabled are also vulnerable to password reset attacks, but not to account takeover, as the vulnerability does not provide attackers with access to the second-factor authentication method.
The vulnerability impacts GitLab Community Edition (CE) and Enterprise Edition (EE) versions 16.1 to 16.7.1 and was addressed with the release of GitLab versions 16.5.6, 16.6.4, and 16.7.2. The fix was backported to GitLab versions 16.1.6, 16.2.9, 16.3.7, and 16.4.5.
Users are advised to update their self-managed instances of GitLab to a patched version and to enable 2FA for all accounts.
“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 notes.
In addition to CVE-2023-7028, the latest GitLab CE/EE releases resolve another critical-severity bug that allows attackers “to abuse Slack/Mattermost integrations to execute slash commands as another user”. The issue is tracked as CVE-2023-5356 (CVSS score of 9.6).
The updates also resolve a high-severity flaw leading to CODEOWNERS approval bypass when changes are added to a previously approved merge request, a medium-severity access control issue in GitLab Remote Development allowing attackers to create a workspace in a different group than the one its associated agent is in, and a low-severity flaw allowing attackers to modify the metadata of signed commits.