/

CVE-2026-77084

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in n8n Git Node Integration

CVE-2026-77084

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity command injection vulnerability in the n8n Git node causes certain repository-local Git configuration values to be executed as commands by the n8n process.

Exploitation requires a malicious value to be planted in a repository through a separate file-write vulnerability, after which a Git node operation accesses that repository.

Affected context

The vulnerability affects n8n workflows that use the Git node to perform operations on repositories containing attacker-controlled local Git configuration. The issue is not directly reachable through the Git node's normal configuration controls; exploitation generally depends on another weakness or trusted workflow that allows a repository-local value to be written before a subsequent Git operation.

Exploit preconditions

  • Attack surface: n8n Git node operations performed against a repository
  • Required access: Ability to cause or arrange for a malicious repository-local Git configuration value to exist, typically through a separate file-write path
  • Trigger point: A subsequent Git node operation that reads or applies the repository-local configuration
  • Why exploitation is possible: Certain configuration values are passed to Git without adequate neutralization, allowing them to be interpreted as executable command behavior under the n8n process identity

Why this happens

The underlying bug is an OS command injection condition mapped to CWE-78. The Git node trusted repository-local configuration values and allowed Git to interpret them without sufficiently separating configuration data from command-execution semantics. This creates an insecure trust boundary in which attacker-controlled repository metadata can influence process execution.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the n8n process.
  • The n8n runtime could be compromised.
  • Workflow credentials, secrets, or locally accessible data could be exposed.
  • The affected host or container could be used for lateral movement.
  • Workflow integrity and connected automation systems could be disrupted.

General mitigation guidance

Mitigation generally focuses on preventing untrusted repository metadata from influencing executable Git behavior.

Common defensive patterns include:

  • Restricting Git operations to repositories and working trees from trusted sources.
  • Ignoring or neutralizing repository-local configuration when it is not required.
  • Using narrowly scoped Git command modes and explicit allowlists for supported operations.
  • Separating repository file writes from subsequent Git execution and requiring validation at the trust boundary.
  • Running n8n with least-privilege operating-system and container permissions.
  • Limiting accessible credentials, filesystem paths, network destinations, and process capabilities.
  • Treating file-write vulnerabilities elsewhere in the deployment as capable of affecting later Git operations.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify Git process invocation with repository-controlled configuration or environment values.
  • Code review checks for Git operations performed in attacker-writable working trees.
  • Tests that use repositories containing unusual or untrusted local configuration and verify that no external process behavior is triggered.
  • Runtime monitoring for unexpected child processes, command interpreters, or network connections spawned by the n8n process.
  • File-integrity monitoring on workflow repositories and configuration directories.
  • Policy enforcement that restricts n8n's filesystem writes, process creation, and network access.

Automated security review tools may help identify unsafe subprocess and Git integration patterns, but should be supplemented with deployment-level controls.

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-m87g-qr43-ccvc
vulncheck.comvulncheck.com/advisories/n8n-before-remote-code-execution-via-git-node-configuration-values

Frequently asked

questions

No. The described attack path requires a malicious repository-local value to be planted through a separate file-write or equivalent weakness before a Git node operation processes the repository.

An attacker generally needs a way to influence files in a repository that n8n will later access, or control another component capable of writing those files. The Git operation then acts as the trigger.

Prevent untrusted repository-local configuration from influencing Git execution, use explicit and restricted Git behavior, and run n8n with minimal privileges.

Treat repository metadata as untrusted input, review subprocess integrations for configuration injection, restrict file-write paths, and monitor automation runtimes for unexpected child-process activity.

Find out what's already
exploitable in your codebase.