CVE-2025-12506: GitLab Git Reference Resolution Flaw Allows Content Inconsistency
GitLab has addressed a content display inconsistency vulnerability affecting versions 16.5 through 19.1 (depending on release branch). An authenticated user could create a repository where files or content shown in the web interface don't match what users actually download, due to improper handling of Git reference names. While this requires authentication and user interaction to observe, it creates a trust boundary violation where the visual representation of code in the web UI becomes unreliable.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.5 LOW · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N
- Weaknesses (CWE)
- CWE-706
- Affected products
- 2 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-09
NVD description (verbatim)
GitLab has remediated an issue in GitLab CE/EE affecting all versions from 16.5 before 18.11.7, 19.0 before 19.0.4, and 19.1 before 19.1.2 that under certain conditions could have allowed an authenticated user to create a repository where the content displayed in the web interface differed from the content available for download, due to improper handling of Git reference name resolution.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from improper resolution of Git reference names during repository initialization or content delivery. When a user creates a repository under certain conditions, the git ref resolution logic fails to consistently apply the same reference mapping between what the web interface renders and what the Git objects represent. This allows content divergence—an authenticated attacker could craft a repository where symbolic refs, branches, or tags resolve differently depending on the access path (web vs. Git protocol). The root cause is classified under CWE-706 (Use of Incorrectly-Resolved Name or Reference), indicating a namespace or name-binding flaw in how GitLab resolves repository references.
Business impact
The primary business risk is erosion of code review integrity and supply-chain trust. If code displayed for review in GitLab's web interface differs from what developers clone or CI/CD systems retrieve, malicious changes could bypass visual inspection while being included in builds. This is particularly concerning in organizations relying on web-based code review as a control. Secondary impacts include compliance violations (audit trails may show reviewed code that wasn't actually deployed) and operational confusion. The attack requires repository ownership or creation privileges, limiting blast radius, but affects all authenticated users who interact with affected repositories.
Affected systems
GitLab Community Edition (CE) and Enterprise Edition (EE) versions 16.5 up to (but not including) 18.11.7, 19.0 up to (but not including) 19.0.4, and 19.1 up to (but not including) 19.1.2 are affected. Self-managed and SaaS deployments using these versions require patching. The issue does not affect versions prior to 16.5 or versions at/beyond the patched thresholds.
Exploitability
Exploitation requires valid GitLab authentication and the ability to create a repository. It does not require administrative access or network exploitation; the attack is internal to a GitLab instance. However, impact depends on the target environment observing the inconsistency—a casual user browsing repositories may not notice display divergence. The attack is most practical when combined with social engineering or when targeting high-stakes reviews. CVSS 3.5 (Low) reflects these constraints: network accessible, low attack complexity, requires authentication, minimal integrity impact, and no confidentiality or availability impact.
Remediation
Patch immediately to GitLab 18.11.7, 19.0.4, 19.1.2, or later depending on your release line. Verify patch application by checking the GitLab version in Admin > System Information. No configuration changes mitigate this; patching is the sole remediation. Review recent repositories created by authenticated users during the window of vulnerability—look for unusual ref configurations or web UI vs. Git protocol discrepancies in high-value repositories.
Patch guidance
1. Review your current GitLab version (Settings > System Information or `gitlab-rake gitlab:env:info`). 2. Identify your release line (16.x, 18.x, 19.0.x, or 19.1.x). 3. Cross-reference the affected version ranges: 16.5–18.11.6, 19.0.0–19.0.3, 19.1.0–19.1.1. 4. If affected, upgrade to the next patched version: 18.11.7 or later (for 16.5–18.11.x users), 19.0.4 or later (for 19.0.x users), or 19.1.2 or later (for 19.1.x users). 5. Apply patches during a maintenance window; plan for service restart. 6. Test in a staging environment first, especially for large instances. For SaaS users on gitlab.com, patches are applied automatically.
Detection guidance
1. Monitor audit logs for repository creation events, especially by non-admin users. 2. Periodically verify repository content consistency by cloning repositories created during the vulnerability window and comparing file lists/hashes against web UI displays. 3. Check Git refs using `git show-ref` or `git symbolic-ref` for anomalies (unexpected ref targets, circular references). 4. Alert on POST requests to repository creation endpoints followed by unusual ref manipulation. 5. Review merge request diffs visually—if web UI diffs don't align with cloned file content, escalate. 6. Implement signed commits to ensure commit authenticity even if ref resolution is ambiguous.
Why prioritize this
While the CVSS score is low, prioritization depends on your organizational risk model. Prioritize highly if: your security culture relies heavily on web-based code review as a control, you operate a shared GitLab instance with untrusted users, or you have strict supply-chain integrity requirements. Deprioritize if you enforce strong commit signing, use branch protection rules requiring CI validation, or operate a single-tenant or tightly controlled instance. A 30-day patch window is reasonable for most organizations; accelerate to 14 days if you fit the high-risk profile.
Risk score, explained
The CVSS 3.1 score of 3.5 reflects: (1) network accessibility—the attack occurs over HTTP(S); (2) low attack complexity—no special conditions beyond standard Git operations; (3) authentication requirement—significantly reduces risk; (4) limited integrity impact—content divergence is confined to a single repository, not system-wide; and (5) no confidentiality or availability harm. The score does not account for contextual trust violations or organizational controls; security teams should apply judgment based on their code review and supply-chain policies.
Frequently asked questions
Can an unauthenticated user exploit this?
No. The vulnerability explicitly requires GitLab authentication. Any GitLab user can create repositories, so the barrier is low for internal attackers or malicious insiders, but external threat actors cannot exploit this without valid credentials.
Does this affect my code if I don't see a difference between web and clone?
Unlikely, but not impossible. The vulnerability only manifests 'under certain conditions.' If your repositories display consistently between the web UI and cloned content, you are not observing the issue. However, a patch is still required to eliminate the underlying ref-resolution flaw.
Is there a workaround if I cannot patch immediately?
No security workaround exists. As mitigations, enforce strict branch protection rules requiring signed commits and CI validation before merge, and conduct periodic content audits comparing web UI displays to cloned repositories. Upgrade as soon as operationally feasible.
Why does this only affect certain versions and not the latest?
The ref-resolution logic in versions 16.5–19.1 contained the bug. GitLab remediated the flaw in the versions listed above; earlier versions (pre-16.5) were unaffected, and newer versions incorporate the fix. The fix was backported to specific minor versions rather than requiring all users to upgrade to the latest major release.
This analysis is provided for informational purposes. SEC.co makes no warranty regarding exploit feasibility, patch completeness, or organizational risk. Verify all patch versions and compatibility against GitLab's official advisory before deployment. This vulnerability is not currently tracked in CISA's Known Exploited Vulnerabilities (KEV) catalog as of the publication date. Organizations must assess contextual risk based on their own threat models, user populations, and code review controls. Consult GitLab's official security documentation and your vendor's guidance. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-54282LOWStarlette Request URL Hostname Spoofing Vulnerability
- CVE-2026-10696HIGHUniGetUI WinGet Backend Package Name Mismatch RCE
- CVE-2026-13372HIGHRemote Desktop Manager PowerShell VPN Editor Privilege Escalation
- CVE-2026-45306MEDIUMpyLoad Session File Disclosure and Account Takeover
- CVE-2026-54022MEDIUMOpen WebUI Authorization Bypass Leaks Private Notes
- CVE-2026-57054MEDIUMJuniper Junos Web Filtering Bypass on MX Series – Patch Guidance
- CVE-2026-0934LOWGitLab EE Protected Environment Access Control Bypass
- CVE-2026-3176LOWGitLab EE Authorization Bypass – Patch & Remediation Guide