Executive brief
n8n is a workflow automation platform that uses a Git node to manage repository operations. A path traversal vulnerability in the Git node allows authenticated members to bypass file access restrictions by exploiting a mismatch between where the sandbox check validates a relative URL and where git actually resolves it. An attacker can read the contents of git repositories outside the intended sandbox boundaries, potentially exposing sensitive project data or credentials.
Technical details
The vulnerability is a sandbox escape caused by a base-directory mismatch: the Git node validates relative remote URLs against the configured repositoryPath, but then invokes git with that same path as the working directory. Git subsequently walks up to the enclosing repository's top level and resolves the relative URL from there. An authenticated user can nest a repository one level below the configured path, causing the identical URL string to pass the file-access check (N8N_RESTRICT_FILE_ACCESS_TO) when validated but resolve outside the sandbox when git executes. A subsequent fetch or pull operation reads a git repository outside the restricted zone and merges its objects into the user's repository, where contents are accessible. The fix, released in versions 1.123.76, 2.37.7, and 2.38.2, resolves the remote reference from the directory git actually operates in before applying the sandbox check. This is classified as CWE-426 (Untrusted Search Path).
Affected products
- n8n n8n before 1.123.76, 2.37.7, and 2.38.2
Timeline
- 2026-09-16: disclosed
- 2026-09-16: patched: Fixed in n8n 1.123.76, 2.37.7, and 2.38.2