CVE-2026-85706: GitLab repository commits API reads any file on the server without a login

ByLinuxtastic

November 29, 2026 #CVE, #GitLab

GitLab’s repository commits API, from 18.7 until the September 2026 patch releases, could be made to read files from the GitLab server itself, and it did not insist on a login before doing so. On a self-managed instance the files worth reading are well known — gitlab.yml, secrets.json, the database password — and GitLab’s own detection rules for this flaw name the first of them. If you run self-managed GitLab 18.7 or later and have not installed 19.3.2, 19.2.6, 19.1.8, 19.0.9 or 18.11.12, upgrade today and then rotate the secrets an attacker could have read. GitLab.com and GitLab Dedicated were patched by GitLab.

CVE-2026-85706 at a glance.

ComponentGitLab Community and Enterprise Edition, the repository commits REST API, on self-managed Omnibus, Docker and Helm installs
Affected versions18.7 up to and including 18.11.11, 19.0.0–19.0.8, 19.1.0–19.1.7, 19.2.0–19.2.5 and 19.3.0–19.3.1
Fixed in19.3.2, 19.2.6 and 19.1.8, released 10 September 2026; backported to 19.0.9 and 18.11.12 on 23 September 2026
SeverityCVSS 3.1 10.0 Critical (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N, GitLab; NVD carries the same vector). CWE-22 path traversal
Exploited in the wildYes. Added to CISA’s Known Exploited Vulnerabilities catalogue on 11 September 2026, the day after the patch; federal remediation due 14 September 2026. EPSS 0.97 (99.9th percentile) on 13 November 2026
Who is exposedEvery self-managed instance in the affected range whose API is reachable by the attacker, which for most instances means the internet. Not GitLab.com, not GitLab Dedicated. GitLab is not packaged by Debian, Ubuntu or Red Hat, so the fix only arrives through GitLab’s own repositories and images
PublishedCVE record 12 September 2026; this page built 30 November 2026, last updated 30 November 2026

What it is

The repository commits endpoint under /api/v4/projects/:id/repository/commits answers questions about commits and the files they touch. GitLab’s advisory says two things went wrong in it at once: a path parameter was not confined to the repository it was supposed to describe, and the endpoint did not enforce authentication where it should have. Put together, an unauthenticated request could name a path that walked out of the repository and into the server’s filesystem, and the response carried the file back. GitLab scored it 10.0 with a changed scope, which is the score for a flaw that hands over another system’s secrets, and the rules it published for self-managed operators describe exactly that: a read of gitlab.yml, a metadata.path parameter pointing outside the repository, and a file-path attempt.

The flaw was reported through HackerOne by the researcher s3ntago and fixed in the 10 September 2026 critical patch release for the three supported branches; CISA added it to the KEV catalogue the next day, which is as close to “being exploited as the patch shipped” as the public record gets. On 23 September GitLab did something it does not usually do and backported the fix to two branches that had already left support, 19.0 and 18.11, because the affected range reached back to 18.7.

What makes this one different from a typical arbitrary file read is what sits on a GitLab server. /etc/gitlab/gitlab-secrets.json holds the keys that encrypt CI variables, runner tokens and integrations; gitlab.yml and database.yml hold the database credentials; the Rails secret key base signs sessions. A read of any of those is not an information leak to be noted, it is a credential compromise to be acted on, which is why the fix section below has a rotation step after the upgrade.

Who is affected on Linux

GitLab is not in any major distribution’s archive, so the trackers are brief; each row is what they said on 30 November 2026. The install method decides which row applies.

DistributionStatusFixed package
Omnibus packages (gitlab-ee, gitlab-ce) on Debian, Ubuntu, RHEL family, SUSEAffected 18.7–19.3.119.3.2, 19.2.6, 19.1.8, 19.0.9 or 18.11.12 from packages.gitlab.com
Docker images and the Helm chartAffected 18.7–19.3.1image tags and chart versions carrying the same GitLab versions
DebianNot packagedtracker says NOT-FOR-US: src:gitlab was once in the archive but never in a stable release
UbuntuNot consultedtracker page unreachable at build time; GitLab is not in the Ubuntu archive
RHEL, Rocky, Alma, Fedora, SUSE, Arch, AlpineNot packagedno entry; GitLab’s repositories are the only route
GitLab.com and GitLab DedicatedNot affectedpatched by GitLab before the release post

How to check

Two questions: which version and edition is this, and can anonymous requests reach its API. The first file below is written by every Omnibus install; the gitlab-rails form works for all install types but takes a few seconds to start.

# 1. version and edition: below 19.3.2 / 19.2.6 / 19.1.8 / 19.0.9 / 18.11.12 on an 18.7+ branch is affected
head -1 /opt/gitlab/version-manifest.txt 2>/dev/null          # e.g. gitlab-ee 19.3.1
sudo gitlab-rails runner 'puts Gitlab::VERSION' 2>/dev/null

# 2. can the API be reached without a token: anything but 401 from outside means yes
curl -s -o /dev/null -w '%{http_code}\n' https://gitlab.example.com/api/v4/projects

# 3. is public sign-up or public project visibility on (widens what an anonymous caller can name)
sudo gitlab-rails runner 'puts ApplicationSetting.current.slice(:signup_enabled, :restricted_visibility_levels)' 2>/dev/null

A version at or above the fixed release for its branch closes the hole, whatever steps 2 and 3 say. Below it, a 200 from step 2 means the vulnerable endpoint family is reachable by anyone; the request above is harmless and only shows whether the API answers anonymous callers, which on a default install it does. An instance that only answers from inside a VPN is less exposed but not safe, because the flaw needs no account and any foothold inside the network suffices.

Because this one was exploited from the day it was patched, also look back. API calls are logged in api_json.log with their path and parameters, and the three things GitLab’s detection rules look for are all greppable.

# commits API requests that name a traversal, a metadata.path, or gitlab.yml, since 1 September 2026
zgrep -hE '/repository/commits' /var/log/gitlab/gitlab-rails/api_json.log* 2>/dev/null \
  | grep -E '\.\./|%2e%2e|metadata\.path|gitlab\.yml|secrets\.json|database\.yml' \
  | awk -F'"remote_ip":"' '{print $2}' | cut -d'"' -f1 | sort | uniq -c | sort -rn | head

# the same, with the full request lines for the top address
zgrep -hE '/repository/commits' /var/log/gitlab/gitlab-rails/api_json.log* | grep -E '\.\./|metadata\.path' | head -5

A request of that shape that received a 200 is a successful read, not an attempt, and the file it named tells you what was taken. If gitlab-secrets.json, gitlab.yml or database.yml appears, treat every secret in them as known to someone else: the fix section covers rotation, and GitLab’s documentation on rotating the secrets file is the authority for the order of operations. If the log has been rotated past the window, the absence of evidence is only that, and the rotation is still the conservative choice for an instance that was exposed and unpatched between 10 September and the day it was upgraded.

How to fix it

Upgrade to the fixed release for your branch. GitLab’s upgrade path rules still apply — you cannot jump from 18.7 to 19.3 in one step — but every affected branch has a fixed point release, so the first move is always a point release within the branch you are on, which needs no path planning. Pin the version in the package command so a repository that already carries 19.4 does not take you further than you planned.

# Debian / Ubuntu, Omnibus (substitute gitlab-ce, and the fixed release of your branch)
sudo apt update
sudo apt install gitlab-ee=19.3.2-ee.0
sudo gitlab-ctl status

# RHEL family, Omnibus
sudo dnf upgrade gitlab-ee-19.3.2-ee.0.el9
sudo gitlab-ctl status

# Docker: move the image tag, e.g. gitlab/gitlab-ee:19.3.2-ee.0, then recreate the container
# Helm: bump the chart to the version that carries 19.3.2 and upgrade the release

The package upgrade restarts the services itself; confirm with gitlab-ctl status and the version check above. Then, if the log review found a successful read or could not rule one out, rotate: the database password, the secrets in /etc/gitlab/gitlab-secrets.json following GitLab’s documented procedure (which re-encrypts CI variables and will invalidate integrations until they are re-entered), runner registration tokens, and personal and project access tokens created before the upgrade. The step people skip is the last one, and it is the one an attacker who read the database would rely on. GitLab offers no workaround for this flaw; if the upgrade truly cannot happen today, taking the API off the public internet at the reverse proxy is the only interim measure that actually removes the exposure, and it will break every runner and integration that reaches the instance from outside.

Sources

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.