CVE-2025-5101

Improper Control of Generation of Code ('Code Injection') in GitLab

Published Aug 27, 2025 CVSS 3.1 · 5 Medium EPSS < 1% KEV · Not listed
Description
An issue has been discovered in GitLab CE/EE affecting all versions before 18.1.5, 18.2 before 18.2.5, and 18.3 before 18.3.1 that under certain conditions could have allowed an authenticated attacker to distribute malicious code that appears harmless in the web interface by taking advantage of ambiguity between branches and tags during repository imports.

Remediation

Vendor Solution

Upgrade to versions 18.1.5, 18.2.5, 18.3.1 or above.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-25949 An issue has been discovered in GitLab CE/EE affecting all versions before 18.1.5, 18.2 before 18.2.5, and 18.3 before 18.3.1 that under certain conditions could have allowed an authenticated attacker to distribute malicious code that appears harmless in the web interface by taking advantage of ambiguity between branches and tags during repository imports.
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitlab:gitlab:*:*:*:*:community:*:*:*
cpe:2.3:a:gitlab:gitlab:*:*:*:*:enterprise:*:*:*
cpe:2.3:a:gitlab:gitlab:18.3.0:*:*:*:community:*:*:*
cpe:2.3:a:gitlab:gitlab:18.3.0:*:*:*:enterprise:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description An issue has been discovered in GitLab CE/EE affecting all versions before 18.1.5, 18.2 before 18.2.5, and 18.3 before 18.3.1 that under certain conditions could have allowed an authenticated attacker to distribute malicious code that appears harmless in the web interface by taking advantage of ambiguity between branches and tags during repository imports.
Title Improper Control of Generation of Code ('Code Injection') in GitLab
First Time appeared Gitlab
Gitlab gitlab
Weaknesses CWE-94
CPEs cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*
Vendors & Products Gitlab
Gitlab gitlab
References
Metrics cvssV3_1

{'score': 5, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:N/I:H/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitLab
Published
Updated
Aug 27, 2025, 7:53 PM
Reserved
May 22, 2025, 9:30 PM
Status
Analyzed
Published
Aug 27, 2025, 8:15 PM
Modified
Jun 17, 2026, 9:47 AM