The analysis for CVE-2026-85706 focused on identifying vulnerable functions based on the vulnerability description and available exploit code. The CVE describes an 'Improper Limitation of a Pathname to a Restricted Directory (Path Traversal)' and 'missing authentication enforcement in the repository commits API' in GitLab.
Initial attempts to find direct commit information from GitLab work items and HackerOne reports were unsuccessful due to lack of specific links or rate-limiting. A Google search for the CVE led to several security advisories and, crucially, public exploit code on GitHub.
Examination of the Python exploit code (from guneykabel and solivaquaant) revealed the exact API endpoints and parameters used to trigger the vulnerability. The exploits target POST requests to /api/v4/projects/{id}/repository/commits and POST/PUT requests to /api/v4/projects/{id}/repository/files/{fp}. In both cases, a file.path parameter is used to specify the target file for path traversal.
Given that GitLab is a Ruby on Rails application, these API endpoints are handled by controller actions. The naming convention suggests controllers like API::V4::Projects::Repository::CommitsController and API::V4::Projects::Repository::FilesController. The POST requests would typically map to a create action, and PUT requests to an update action.
The core of the vulnerability lies in two aspects:
- Missing Authentication: The identified controller actions were accessible to unauthenticated users, allowing them to initiate the file reading process.
- Improper Path Confinement: Within these actions, the
file.path parameter, supplied by the attacker, was used to construct file paths without proper sanitization or validation, enabling path traversal to arbitrary files on the server.
Therefore, the functions identified are the specific controller actions that serve as the entry points for these vulnerable API calls, as they are where both the lack of authentication and the processing of the malicious path input occur.