Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in GitLab
Patch now. It under exploitation confirmed by CISA and has a working public exploit.
Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
An unauthenticated attacker can read any file from a GitLab server by exploiting a path traversal flaw in the repository commits API. This is critical because it allows unauthorized access to sensitive data without needing to log in.
A path traversal vulnerability in GitLab's repository commits API permits unauthenticated users to bypass path confinement controls and read arbitrary files from the server filesystem. The flaw stems from improper input validation and missing authentication enforcement; attackers can craft malicious API requests to traverse directory restrictions and access sensitive data.