CVE-2023-5198: CWE-863: Incorrect Authorization in GitLab GitLab
An issue has been discovered in GitLab affecting all versions prior to 16.2.7, all versions starting from 16.3 before 16.3.5, and all versions starting from 16.4 before 16.4.1. It was possible for a removed project member to write to protected branches using deploy keys.
AI Analysis
Technical Summary
CVE-2023-5198 is an authorization vulnerability identified in GitLab, a widely used web-based DevOps lifecycle tool that provides Git repository management, CI/CD pipelines, and project collaboration features. The flaw affects multiple GitLab versions: all versions prior to 16.2.7, versions from 16.3 up to but not including 16.3.5, and versions from 16.4 up to but not including 16.4.1. The vulnerability arises from improper authorization checks related to deploy keys and project membership status. Specifically, a user who has been removed as a project member could still write to protected branches using deploy keys. Protected branches in GitLab are typically used to safeguard critical code branches from unauthorized changes, ensuring code integrity and stability. The issue is classified under CWE-863 (Incorrect Authorization), indicating that the system fails to properly restrict access rights. The CVSS v3.1 base score is 4.3 (medium severity), with the vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N, meaning the vulnerability can be exploited remotely over the network with low attack complexity, requires low privileges (a project member removed but still possessing deploy keys), no user interaction, and impacts integrity but not confidentiality or availability. No known exploits have been reported in the wild as of the publication date (September 29, 2023). The vulnerability allows unauthorized code modifications to protected branches, potentially enabling malicious code injection, backdoors, or disruption of the software development lifecycle. This can undermine trust in the codebase and lead to downstream security issues in software products relying on the compromised repositories.
Potential Impact
For European organizations, the impact of CVE-2023-5198 can be significant, especially for enterprises and public sector entities that rely heavily on GitLab for source code management and CI/CD pipelines. Unauthorized write access to protected branches can lead to the insertion of malicious code, which may propagate through automated build and deployment processes, affecting production environments and end-users. This can result in intellectual property theft, introduction of vulnerabilities, or sabotage of critical software systems. Organizations in sectors such as finance, healthcare, telecommunications, and government, which often have stringent regulatory and compliance requirements, may face reputational damage, legal consequences, and operational disruptions if their software supply chain integrity is compromised. Additionally, the vulnerability could be exploited as part of a broader supply chain attack, which has become a prominent threat vector in recent years. Given the medium CVSS score and the requirement for at least low privileges (a removed project member with deploy keys), the risk is moderate but should not be underestimated, especially in environments with complex access management and multiple collaborators. The lack of known exploits in the wild reduces immediate urgency but does not eliminate the risk, as attackers may develop exploits in the future.
Mitigation Recommendations
To mitigate CVE-2023-5198, European organizations should take the following specific actions: 1) Immediately upgrade GitLab instances to the fixed versions: 16.2.7 or later, 16.3.5 or later, or 16.4.1 or later, depending on the current version in use. 2) Audit deploy key usage and project membership regularly to ensure that removed members do not retain deploy keys or other credentials that grant write access. 3) Implement stricter access control policies that automatically revoke deploy keys and other credentials upon project membership changes or removals. 4) Review and tighten branch protection rules, including enabling additional approval requirements or code review policies for protected branches. 5) Monitor GitLab audit logs for unusual write activity on protected branches, especially from users who should no longer have access. 6) Consider integrating GitLab with centralized identity and access management (IAM) solutions to streamline and automate access revocation. 7) Educate development teams about the importance of credential hygiene and the risks of lingering access rights. 8) If feasible, implement additional security controls such as signed commits and continuous monitoring of the software supply chain to detect unauthorized changes promptly.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland, Belgium, Finland
CVE-2023-5198: CWE-863: Incorrect Authorization in GitLab GitLab
Description
An issue has been discovered in GitLab affecting all versions prior to 16.2.7, all versions starting from 16.3 before 16.3.5, and all versions starting from 16.4 before 16.4.1. It was possible for a removed project member to write to protected branches using deploy keys.
AI-Powered Analysis
Technical Analysis
CVE-2023-5198 is an authorization vulnerability identified in GitLab, a widely used web-based DevOps lifecycle tool that provides Git repository management, CI/CD pipelines, and project collaboration features. The flaw affects multiple GitLab versions: all versions prior to 16.2.7, versions from 16.3 up to but not including 16.3.5, and versions from 16.4 up to but not including 16.4.1. The vulnerability arises from improper authorization checks related to deploy keys and project membership status. Specifically, a user who has been removed as a project member could still write to protected branches using deploy keys. Protected branches in GitLab are typically used to safeguard critical code branches from unauthorized changes, ensuring code integrity and stability. The issue is classified under CWE-863 (Incorrect Authorization), indicating that the system fails to properly restrict access rights. The CVSS v3.1 base score is 4.3 (medium severity), with the vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N, meaning the vulnerability can be exploited remotely over the network with low attack complexity, requires low privileges (a project member removed but still possessing deploy keys), no user interaction, and impacts integrity but not confidentiality or availability. No known exploits have been reported in the wild as of the publication date (September 29, 2023). The vulnerability allows unauthorized code modifications to protected branches, potentially enabling malicious code injection, backdoors, or disruption of the software development lifecycle. This can undermine trust in the codebase and lead to downstream security issues in software products relying on the compromised repositories.
Potential Impact
For European organizations, the impact of CVE-2023-5198 can be significant, especially for enterprises and public sector entities that rely heavily on GitLab for source code management and CI/CD pipelines. Unauthorized write access to protected branches can lead to the insertion of malicious code, which may propagate through automated build and deployment processes, affecting production environments and end-users. This can result in intellectual property theft, introduction of vulnerabilities, or sabotage of critical software systems. Organizations in sectors such as finance, healthcare, telecommunications, and government, which often have stringent regulatory and compliance requirements, may face reputational damage, legal consequences, and operational disruptions if their software supply chain integrity is compromised. Additionally, the vulnerability could be exploited as part of a broader supply chain attack, which has become a prominent threat vector in recent years. Given the medium CVSS score and the requirement for at least low privileges (a removed project member with deploy keys), the risk is moderate but should not be underestimated, especially in environments with complex access management and multiple collaborators. The lack of known exploits in the wild reduces immediate urgency but does not eliminate the risk, as attackers may develop exploits in the future.
Mitigation Recommendations
To mitigate CVE-2023-5198, European organizations should take the following specific actions: 1) Immediately upgrade GitLab instances to the fixed versions: 16.2.7 or later, 16.3.5 or later, or 16.4.1 or later, depending on the current version in use. 2) Audit deploy key usage and project membership regularly to ensure that removed members do not retain deploy keys or other credentials that grant write access. 3) Implement stricter access control policies that automatically revoke deploy keys and other credentials upon project membership changes or removals. 4) Review and tighten branch protection rules, including enabling additional approval requirements or code review policies for protected branches. 5) Monitor GitLab audit logs for unusual write activity on protected branches, especially from users who should no longer have access. 6) Consider integrating GitLab with centralized identity and access management (IAM) solutions to streamline and automate access revocation. 7) Educate development teams about the importance of credential hygiene and the risks of lingering access rights. 8) If feasible, implement additional security controls such as signed commits and continuous monitoring of the software supply chain to detect unauthorized changes promptly.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitLab
- Date Reserved
- 2023-09-26T10:01:49.676Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682ea68a0acd01a249253fa8
Added to database: 5/22/2025, 4:22:34 AM
Last enriched: 6/5/2025, 2:28:28 PM
Last updated: 7/4/2025, 9:46:23 PM
Views: 9
Related Threats
CVE-2025-7076: Improper Access Controls in BlackVue Dashcam 590X
MediumCVE-2025-7075: Unrestricted Upload in BlackVue Dashcam 590X
MediumCVE-2025-6022
LowCVE-2025-5316
LowCVE-2025-5104
LowActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.