CVE-2026-85706

GitLab Path Traversal Arbitrary File Read (CVE-2026-85706)

Initial Access Discovery Collection Last updated:

Detects exploitation attempts and successful arbitrary file reads against GitLab Community Edition and Enterprise Edition via a path traversal vulnerability (CVE-2026-85706, CWE-35). Attackers abuse encoded or literal traversal sequences in GitLab HTTP request paths and parameters to read files outside the intended web root — including /etc/passwd, GitLab secrets (gitlab-secrets.json, secrets.yml), the database configuration, and SSH keys. The flaw is listed on the CISA KEV catalog and is being actively exploited in the wild; GitLab has urged immediate patching to 19.3.2 (and equivalent 19.2.x / 19.1.x patch releases). Detection focuses on traversal patterns in GitLab Workhorse/Rails access logs, anomalous file access by the git/gitlab-www service account, and outbound responses containing sensitive file content.

Vulnerability Intelligence

KEV — Known Exploited

What is CVE-2026-85706 GitLab Path Traversal Arbitrary File Read (CVE-2026-85706)?

GitLab Path Traversal Arbitrary File Read (CVE-2026-85706) (CVE-2026-85706) maps to the Initial Access and Discovery and Collection tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for GitLab Path Traversal Arbitrary File Read (CVE-2026-85706), covering the data sources and telemetry it touches: IIS/Reverse Proxy Logs, GitLab Workhorse Access Logs, Web Application Firewall. The queries below are rated critical severity at high confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Discovery Collection
Microsoft Sentinel / Defender
kusto
let traversalPatterns = dynamic(["..%2f","..%2F","%2e%2e%2f","%2e%2e/","..\\","..%5c","%252e%252e","....//","/etc/passwd","gitlab-secrets.json","secrets.yml","database.yml"]);
W3CIISLog
| union (CommonSecurityLog | extend RequestURL = RequestURL, csHost = DestinationHostName, csUriStem = RequestURL)
| where isnotempty(csUriStem)
| extend decodedUri = tolower(url_decode(csUriStem))
| where decodedUri has_any (traversalPatterns) or cs_uri_query has_any (traversalPatterns)
| where csHost has "gitlab" or sSiteName has "gitlab" or csUriStem has "/gitlab"
| project TimeGenerated, csHost, cIP, csUriStem, cs_uri_query, decodedUri, scStatus, csUserAgent
| sort by TimeGenerated desc

Identifies GitLab HTTP requests containing path-traversal sequences or references to sensitive files, indicating attempts to exploit CVE-2026-85706 for arbitrary file read.

critical severity high confidence

Data Sources

IIS/Reverse Proxy Logs GitLab Workhorse Access Logs Web Application Firewall

Required Tables

W3CIISLog CommonSecurityLog

False Positives

  • Legitimate GitLab repository paths that coincidentally contain '..' in branch or file names within the repo tree
  • Security scanners and authorized vulnerability assessment tools probing the GitLab instance
  • Automated backup or migration tooling reading configuration files over HTTP APIs

Sigma rule & cross-platform mapping

The detection logic for GitLab Path Traversal Arbitrary File Read (CVE-2026-85706) (CVE-2026-85706) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: network_connection
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Encoded path traversal to /etc/passwd against GitLab

    Expected signal: A web request to the GitLab host containing an encoded '../' sequence and a reference to etc/passwd appears in Workhorse/proxy access logs.

  2. Test 2Traversal read of gitlab-secrets.json

    Expected signal: Access log entry with '....//' traversal and gitlab-secrets.json in the URI against the GitLab service.

  3. Test 3Backslash-encoded traversal probe (Windows client)

    Expected signal: Proxy/Workhorse log records a request containing '..%5c' encoded backslash traversal to the GitLab host.


Response Playbook

Triage

  1. Confirm the targeted host is a GitLab CE/EE instance and identify its running version; anything below the fixed 19.3.2 (or the corresponding 19.2.x/19.1.x patch release) is vulnerable to CVE-2026-85706.
  2. Decode the request URI and query string from the alert and confirm the traversal payload resolves to a real out-of-web-root file (e.g., /etc/passwd, gitlab-secrets.json, config/secrets.yml, config/database.yml).
  3. Inspect the HTTP response status and size for the offending request — a 200 with a non-trivial body indicates a successful file read rather than a blocked/failed attempt.
  4. Enumerate all requests from the source IP against the GitLab host to determine whether reconnaissance escalated to reads of secret material.

Containment

  1. Apply the GitLab patch (upgrade to 19.3.2 or the relevant back-ported patch release) immediately; if patching cannot be immediate, place the instance behind a WAF rule blocking encoded traversal sequences and restrict inbound access to trusted networks.
  2. Block the offending source IP(s) at the perimeter/WAF and rate-limit anonymous access to the GitLab web front end.

Evidence Collection

  1. Preserve GitLab Workhorse and Rails production access/error logs, the fronting NGINX/reverse-proxy logs, and any WAF logs covering the exploitation window.
  2. Snapshot the GitLab server filesystem and capture the current gitlab-secrets.json and config files to determine exactly what an attacker could have exfiltrated.

Escalation Criteria

  • ! Escalate to incident response if any request returned HTTP 200 with the contents of gitlab-secrets.json, secrets.yml, or database.yml — assume secret key material and DB credentials are compromised.
  • ! Escalate if traversal reads are followed by authenticated sessions, new personal access tokens, CI/CD variable access, or repository cloning from the same or related source, indicating post-exploitation.

Investigation Guide

Forensic Artifacts

  • > GitLab Workhorse/Rails production access logs (/var/log/gitlab/gitlab-workhorse/current, /var/log/gitlab/gitlab-rails/production.log)
  • > Reverse proxy access logs (/var/log/gitlab/nginx/gitlab_access.log)
  • > Contents and mtime of /etc/gitlab/gitlab-secrets.json and config/database.yml on the affected host

Tuning Guidance

Baseline legitimate GitLab repository paths that contain relative components before enforcing high-severity alerting; exclude known scanner IPs and internal CI/CD runners. Prioritize alerts where the HTTP response is 200 with a body size consistent with the target file, and correlate source IPs across recon and read stages to reduce noise from opportunistic probing.


Hunting Queries

Hunt for repeated traversal sequences and sensitive-file references against GitLab, grouped by source IP and response status to separate probes from successful reads.

Hunting — KQL
kql
W3CIISLog | extend d = tolower(url_decode(csUriStem)) | where d matches regex @"(\.\.[\\/]){2,}" or d has "gitlab-secrets.json" | summarize count(), makeset(csUriStem) by cIP, scStatus | sort by count_ desc
Hunting — SPL
spl
index=web (sourcetype=gitlab:workhorse OR sourcetype=nginx:plus:access) | eval d=urldecode(uri_path) | regex d="(?i)(\.\.[\\/]){2,}|gitlab-secrets\.json|secrets\.yml" | stats count values(d) as paths by src_ip status | sort - count

Atomic Red Team Tests

Test 1 Encoded path traversal to /etc/passwd against GitLab
linux

Sends a GitLab HTTP request with a URL-encoded traversal sequence attempting to read /etc/passwd, simulating CVE-2026-85706 exploitation.

Command

bash
curl -sk 'https://gitlab.lab.local/-/%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd' -H 'User-Agent: atomic-cve-2026-85706' -o /tmp/atomic_gitlab_passwd.out; head -n 3 /tmp/atomic_gitlab_passwd.out

Cleanup

bash
rm -f /tmp/atomic_gitlab_passwd.out

Expected Telemetry

A web request to the GitLab host containing an encoded '../' sequence and a reference to etc/passwd appears in Workhorse/proxy access logs.

Expected Detection

The KQL, SPL, and Chronicle rules match on the decoded traversal pattern and etc/passwd reference for the GitLab host.

Test 2 Traversal read of gitlab-secrets.json
linux

Attempts to read GitLab's secrets file via a traversal payload to validate detection of the most sensitive CVE-2026-85706 target.

Command

bash
curl -sk 'https://gitlab.lab.local/-/....//....//....//opt/gitlab/embedded/service/gitlab-rails/config/gitlab-secrets.json' -H 'User-Agent: atomic-cve-2026-85706' -o /tmp/atomic_gitlab_secrets.out

Cleanup

bash
rm -f /tmp/atomic_gitlab_secrets.out

Expected Telemetry

Access log entry with '....//' traversal and gitlab-secrets.json in the URI against the GitLab service.

Expected Detection

Rules fire on the gitlab-secrets.json indicator and multi-dot traversal regex; escalation criteria trigger if the response is HTTP 200.

Test 3 Backslash-encoded traversal probe (Windows client)
windows

Issues an encoded backslash traversal request from a Windows host to confirm detection coverage of alternate encoding forms for CVE-2026-85706.

Command

powershell
powershell -c "Invoke-WebRequest -SkipCertificateCheck -UseBasicParsing -Uri 'https://gitlab.lab.local/-/..%5c..%5c..%5c..%5cetc%5cpasswd' -Headers @{'User-Agent'='atomic-cve-2026-85706'} -OutFile $env:TEMP\atomic_gitlab.out"

Cleanup

powershell
powershell -c "Remove-Item $env:TEMP\atomic_gitlab.out -ErrorAction SilentlyContinue"

Expected Telemetry

Proxy/Workhorse log records a request containing '..%5c' encoded backslash traversal to the GitLab host.

Expected Detection

KQL and CQL rules match the '..%5c' / '..\\' backslash traversal patterns against the GitLab service.

Related Detections