CVE-2024-4024 in Community Editioninfo

Summary

by MITRE • 04/25/2024

An issue has been discovered in GitLab CE/EE affecting all versions starting from 7.8 before 16.9.6, all versions starting from 16.10 before 16.10.4, all versions starting from 16.11 before 16.11.1. Under certain conditions, an attacker with their Bitbucket account credentials may be able to take over a GitLab account linked to another user's Bitbucket account, if Bitbucket is used as an OAuth 2.0 provider on GitLab.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 04/03/2025

This vulnerability represents a critical account takeover flaw in GitLab's OAuth 2.0 integration with Bitbucket, specifically affecting versions from 7.8 through 16.9.5, 16.10.0 through 16.10.3, and 16.11.0 through 16.11.0. The issue stems from improper validation of OAuth 2.0 authorization responses during the account linking process, creating a session hijacking opportunity for attackers who possess valid Bitbucket credentials. The vulnerability manifests when GitLab's OAuth implementation fails to properly verify the identity claims provided by Bitbucket's authorization server, allowing an attacker to associate their Bitbucket account with another user's GitLab account through manipulated OAuth flows. This represents a classic identity assertion vulnerability that maps to CWE-287 Authentication Bypass Through Identity Assertion, where the system incorrectly trusts identity information provided during the authentication process without sufficient verification mechanisms. The operational impact extends beyond simple credential theft, as successful exploitation enables attackers to gain unauthorized access to GitLab repositories, project data, and collaborative environments that belong to legitimate users. Attackers can leverage this vulnerability to access sensitive code repositories, modify project configurations, manipulate continuous integration pipelines, and potentially escalate privileges within the GitLab instance. The attack vector is particularly concerning because it requires minimal user interaction beyond having valid Bitbucket credentials, making it a significant risk for organizations that rely on Bitbucket as an OAuth provider for GitLab authentication. This vulnerability aligns with ATT&CK technique T1531 Credential Access: Use of stolen credentials, and specifically targets the credential validation and session management components of the GitLab platform. Organizations using GitLab with Bitbucket OAuth integration face substantial risk of unauthorized access, data breaches, and potential lateral movement within their development environments. The vulnerability's persistence across multiple version ranges indicates a fundamental flaw in the OAuth 2.0 implementation that required multiple patch releases to address. Mitigation strategies include immediate upgrading to patched versions, implementing additional authentication controls, monitoring OAuth 2.0 authorization flows for suspicious activity, and potentially disabling Bitbucket OAuth integration until proper validation mechanisms are in place. Security teams should also consider implementing multi-factor authentication requirements for critical GitLab accounts and establishing comprehensive monitoring of account linking activities to detect potential exploitation attempts. The vulnerability underscores the importance of proper identity verification in federated authentication systems and highlights the need for robust OAuth 2.0 implementation practices that validate all identity claims before establishing user sessions.

Responsible

GitLab Inc.

Reservation

04/22/2024

Disclosure

04/25/2024

Moderation

accepted

CPE

ready

EPSS

0.14903

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!