Skip to main content

CVE-2023-5061: CWE-862: Missing Authorization in GitLab GitLab

Medium
VulnerabilityCVE-2023-5061cvecve-2023-5061cwe-862
Published: Fri Dec 15 2023 (12/15/2023, 16:03:05 UTC)
Source: CVE
Vendor/Project: GitLab
Product: GitLab

Description

An issue has been discovered in GitLab affecting all versions starting from 9.3 before 16.4.4, all versions starting from 16.5 before 16.5.4, all versions starting from 16.6 before 16.6.2. In certain situations, it may have been possible for developers to override predefined CI variables via the REST API.

AI-Powered Analysis

AILast updated: 07/07/2025, 11:55:33 UTC

Technical Analysis

CVE-2023-5061 is a medium-severity vulnerability identified in GitLab, a widely used web-based DevOps lifecycle tool that provides Git repository management, CI/CD pipelines, and more. The vulnerability affects all GitLab versions starting from 9.3 up to versions prior to 16.4.4, 16.5 up to before 16.5.4, and 16.6 before 16.6.2. The core issue is a missing authorization check (CWE-862) in the GitLab REST API, which in certain scenarios allows developers to override predefined Continuous Integration (CI) variables. CI variables are critical in defining environment-specific parameters and secrets used during automated build and deployment processes. By overriding these variables, an attacker with developer-level access could manipulate the CI pipeline behavior, potentially injecting malicious commands or altering the build environment. The vulnerability does not require user interaction and can be exploited remotely over the network with low attack complexity, but it does require the attacker to have at least developer privileges within the affected GitLab instance. The CVSS 3.1 base score is 4.3 (medium), reflecting limited confidentiality impact but a potential integrity impact due to unauthorized modification of CI variables. No known exploits in the wild have been reported to date. The vulnerability was publicly disclosed on December 15, 2023, and patches are available in GitLab versions 16.4.4, 16.5.4, and 16.6.2 and later. Organizations using affected GitLab versions should prioritize upgrading to patched releases to mitigate the risk.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to the integrity of their CI/CD pipelines. By allowing developers to override predefined CI variables, attackers could alter build configurations, inject malicious code, or leak sensitive information embedded in CI variables. This could lead to compromised software builds, unauthorized code execution, or exposure of secrets such as API keys or credentials. The impact is particularly critical for organizations relying heavily on automated DevOps workflows for software delivery, including financial institutions, technology companies, and critical infrastructure providers. While confidentiality and availability impacts are limited, the integrity compromise could undermine trust in software releases and potentially introduce backdoors or vulnerabilities into production systems. Given the widespread use of GitLab across Europe, especially in technology hubs and industries with stringent compliance requirements, the vulnerability could have significant operational and reputational consequences if exploited.

Mitigation Recommendations

1. Immediate upgrade: Organizations should upgrade all GitLab instances to the patched versions 16.4.4, 16.5.4, 16.6.2, or later to remediate the vulnerability. 2. Access control review: Restrict developer-level permissions to trusted personnel only, minimizing the risk of misuse of the override capability. 3. Audit CI variable usage: Review and monitor CI variable configurations and changes, especially those made via the REST API, to detect unauthorized modifications. 4. Implement pipeline security best practices: Use protected variables and environments in GitLab to limit exposure of sensitive data. 5. Network segmentation: Limit access to GitLab REST API endpoints to trusted networks and users to reduce attack surface. 6. Logging and alerting: Enable detailed logging of API calls related to CI variable changes and set up alerts for unusual activity. 7. Incident response readiness: Prepare to investigate and remediate potential pipeline compromises, including verifying build artifacts and source code integrity post-exploitation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitLab
Date Reserved
2023-09-19T07:30:36.245Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682ea68a0acd01a249253fa6

Added to database: 5/22/2025, 4:22:34 AM

Last enriched: 7/7/2025, 11:55:33 AM

Last updated: 7/26/2025, 2:15:48 PM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats