Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-92587

CVE-2026-92587: n8n Git Node Path Traversal Vulnerability

CVE-2026-92587 is a path traversal flaw in n8n workflow automation platform that allows authenticated users to access git repositories outside restricted directories. This article covers technical details, affected versions, and mitigation strategies.

Published:

CVE-2026-92587 Overview

CVE-2026-92587 is a sandbox escape vulnerability in n8n, an open-source workflow automation platform. The Git node in n8n validated a relative remote URL against the configured repositoryPath but invoked git using that path as its working directory. When a user nested a repository one level below the configured path, git walked up to the enclosing repository's top level and resolved the relative URL from outside the sandbox. An authenticated member could then read arbitrary git repositories outside the N8N_RESTRICT_FILE_ACCESS_TO boundary. Maintainers fixed the flaw in versions 1.123.76, 2.37.7, and 2.38.2.

Critical Impact

An authenticated n8n user can bypass the file-access sandbox and read the contents of git repositories located outside the configured repositoryPath.

Affected Products

  • n8n versions before 1.123.76
  • n8n versions before 2.37.7
  • n8n versions before 2.38.2

Discovery Timeline

  • 2026-09-16 - CVE-2026-92587 published to the National Vulnerability Database
  • 2026-09-16 - Last updated in NVD database

Technical Details for CVE-2026-92587

Vulnerability Analysis

The vulnerability is a path resolution flaw [CWE-426] in the n8n Git node. n8n enforces a filesystem sandbox through the N8N_RESTRICT_FILE_ACCESS_TO setting and validates that user-supplied remote URLs resolve inside the configured repositoryPath. The Git node performed this validation using the configured path as the reference directory, then invoked the git binary with the same path as its working directory.

When git runs inside a subdirectory of a larger repository, it walks upward to locate the enclosing repository's top level. It then resolves relative paths from that top level rather than from the caller-supplied working directory. The validation logic and the execution context therefore disagreed on where a relative URL pointed, producing a time-of-check versus time-of-use gap in file access control.

A subsequent git fetch or git pull read objects from a repository located outside N8N_RESTRICT_FILE_ACCESS_TO and merged them into the authenticated user's own repository. The user could then read the merged contents through normal workflow operations.

Root Cause

The root cause is inconsistent base-directory handling. The sandbox check resolved the relative remote URL against the configured repositoryPath, while git resolved the same string from the enclosing repository's top-level directory. Patched versions resolve the remote reference from the directory git actually operates in before applying the sandbox check.

Attack Vector

Exploitation requires an authenticated n8n member account with access to Git node workflows. The attacker nests a repository one level below the configured repositoryPath, then supplies a relative remote URL that passes the sandbox validation but resolves to a target repository outside the sandbox when executed by git. A fetch or pull operation then imports the target repository's objects into the attacker-controlled repository.

Exploitation does not require code execution or elevated privileges beyond a standard member role. Full technical details are available in the GitHub Security Advisory and the VulnCheck Advisory on n8n.

Detection Methods for CVE-2026-92587

Indicators of Compromise

  • Git repositories nested inside the configured n8n repositoryPath that were not created by the platform administrator.
  • git fetch or git pull operations invoked by n8n workflows referencing relative remote URLs.
  • Unexpected commits or merged objects in user repositories that originate from paths outside N8N_RESTRICT_FILE_ACCESS_TO.

Detection Strategies

  • Audit n8n workflow execution logs for Git node activity where the remote parameter contains relative path segments such as ../.
  • Inspect the filesystem beneath repositoryPath for nested .git directories that would trigger git's upward search behavior.
  • Correlate n8n member activity with git process execution events to identify fetch or pull operations targeting unexpected paths.

Monitoring Recommendations

  • Enable file integrity monitoring on directories outside N8N_RESTRICT_FILE_ACCESS_TO that contain sensitive git repositories.
  • Forward n8n audit logs and host process telemetry to a centralized analytics platform for correlation.
  • Alert on any n8n workflow that adds, modifies, or fetches Git node remotes containing relative path traversal characters.

How to Mitigate CVE-2026-92587

Immediate Actions Required

  • Upgrade n8n to version 1.123.76, 2.37.7, or 2.38.2 depending on the release branch in use.
  • Review existing user repositories under repositoryPath for nested .git directories and remove any that were not created by an administrator.
  • Restrict the n8n member role to trusted users while patches are being validated.

Patch Information

The issue is fixed in n8n 1.123.76, 2.37.7, and 2.38.2. Patched builds resolve the remote reference from the directory git actually operates in before applying the sandbox check, closing the time-of-check versus time-of-use gap. Refer to the GitHub Security Advisory for the vendor patch notes.

Workarounds

  • Disable the Git node by adding n8n-nodes-base.git to the NODES_EXCLUDE environment variable.
  • Restrict repositoryPath to a dedicated volume that contains no other git repositories in parent directories.
  • Limit membership on affected n8n instances until an upgrade window is available.
bash
# Configuration example: disable the Git node until upgrade
export NODES_EXCLUDE="[\"n8n-nodes-base.git\"]"

# Verify the running n8n version after upgrade
n8n --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.