A parameter injection flaw in the git_blame tool of DeepSeek-TUI (and its CodeWhale fork) lets the model-controlled 'rev' argument be replaced with git's --contents=<file> flag, tricking git blame into echoing the contents of any file the host user can read straight into the AI agent's chat transcript. This matters because the tool is registered with automatic approval and a 'read-only' capability label, so no human ever sees a permission prompt before ~/.ssh keys, ~/.aws/credentials, .netrc, or arbitrary .env files are pulled into model context — and it's chainable with indirect prompt injection from a malicious repository's AGENTS.md, the same threat model already documented in CVE-2026-45311. EPSS sits at just 0.32%, there's no CISA KEV listing and no public exploit or scanner template yet, so this is not an active-exploitation emergency, but the CVSS 7.4 (high) reflects a real, low-complexity confidentiality breach requiring only that a user open an untrusted repository. Upgrade deepseek-tui to >=0.8.41 (npm) or apply the equivalent CodeWhale fix in 0.8.64; note the cargo build of deepseek-tui has no patched version listed, so pin usage or restrict it to trusted repos only. Until patched, treat any AI coding agent with auto-approved git tools as untrusted with unfamiliar repositories and audit tool-call logs for git blame/git show invocations containing '--contents=', '--ignore-revs-file=', or leading-hyphen rev values.
What is the risk?
High-severity, high-confidence vulnerability (CVSS 7.4, AV:N/AC:L/PR:N/UI:R) with straightforward exploitability once a user opens a malicious or compromised repository — no privilege escalation needed, the attacker only rides the invoking user's own filesystem permissions. Likelihood of opportunistic mass exploitation is currently low (EPSS 0.32%, not in CISA KEV, no public PoC weaponized into a scanner), but the attack requires no advanced AI/ML expertise beyond crafting a git-flag string, which lowers the bar considerably compared to model-level attacks. The real driver of risk is architectural: an 'Auto' approval requirement on a tool whose declared capability (ReadOnly) does not bound its actual reach (arbitrary filesystem paths vs. workspace-only), which is a class of bug likely to recur across this and similar agentic CLI tools' git-wrapping tools (git_show is already a documented sibling).
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| DeepSeek TUI | npm | >= 0.8.41, < 0.8.64 | 0.8.64 |
| DeepSeek TUI | cargo | >= 0.8.41, < 0.8.64 | 0.8.64 |
| DeepSeek TUI | npm | >= 0.3.27, < 0.8.41 | 0.8.41 |
| DeepSeek TUI | cargo | >= 0.3.27, <= 0.8.41 | No patch |
How severe is it?
What is the attack surface?
What should I do?
1 step-
Upgrade deepseek-tui (npm) to >=0.8.41 and codewhale/codewhale-tui to >=0.8.64, which insert an --end-of-options sentinel before the user/model-supplied rev and reject leading-hyphen values. No patched version exists yet for deepseek-tui on cargo (>=0.3.27, <=0.8.41) — pin or avoid that build until a fix ships, or restrict the tool from operating on untrusted/external repositories in the interim. Defense-in-depth: change git_blame/git_show-style tools to require explicit human approval rather than ApprovalRequirement::Auto whenever a free-text revision/ref parameter is accepted, and validate rev/ref inputs against an allowlist pattern (commit SHA, branch/tag name) rejecting any leading hyphen. Detection: audit AI agent tool-invocation logs for git blame/git show/git log calls containing '--contents=', '--ignore-revs-file=', or arguments beginning with '-' in a rev/ref position; monitor for unexpected reads of sensitive paths (~/.ssh, ~/.aws, ~/.netrc, .env) surfacing in chat transcripts or tool outputs.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-75912?
A parameter injection flaw in the git_blame tool of DeepSeek-TUI (and its CodeWhale fork) lets the model-controlled 'rev' argument be replaced with git's --contents=<file> flag, tricking git blame into echoing the contents of any file the host user can read straight into the AI agent's chat transcript. This matters because the tool is registered with automatic approval and a 'read-only' capability label, so no human ever sees a permission prompt before ~/.ssh keys, ~/.aws/credentials, .netrc, or arbitrary .env files are pulled into model context — and it's chainable with indirect prompt injection from a malicious repository's AGENTS.md, the same threat model already documented in CVE-2026-45311. EPSS sits at just 0.32%, there's no CISA KEV listing and no public exploit or scanner template yet, so this is not an active-exploitation emergency, but the CVSS 7.4 (high) reflects a real, low-complexity confidentiality breach requiring only that a user open an untrusted repository. Upgrade deepseek-tui to >=0.8.41 (npm) or apply the equivalent CodeWhale fix in 0.8.64; note the cargo build of deepseek-tui has no patched version listed, so pin usage or restrict it to trusted repos only. Until patched, treat any AI coding agent with auto-approved git tools as untrusted with unfamiliar repositories and audit tool-call logs for git blame/git show invocations containing '--contents=', '--ignore-revs-file=', or leading-hyphen rev values.
Is CVE-2026-75912 actively exploited?
No confirmed active exploitation of CVE-2026-75912 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-75912?
Upgrade deepseek-tui (npm) to >=0.8.41 and codewhale/codewhale-tui to >=0.8.64, which insert an --end-of-options sentinel before the user/model-supplied rev and reject leading-hyphen values. No patched version exists yet for deepseek-tui on cargo (>=0.3.27, <=0.8.41) — pin or avoid that build until a fix ships, or restrict the tool from operating on untrusted/external repositories in the interim. Defense-in-depth: change git_blame/git_show-style tools to require explicit human approval rather than ApprovalRequirement::Auto whenever a free-text revision/ref parameter is accepted, and validate rev/ref inputs against an allowlist pattern (commit SHA, branch/tag name) rejecting any leading hyphen. Detection: audit AI agent tool-invocation logs for git blame/git show/git log calls containing '--contents=', '--ignore-revs-file=', or arguments beginning with '-' in a rev/ref position; monitor for unexpected reads of sensitive paths (~/.ssh, ~/.aws, ~/.netrc, .env) surfacing in chat transcripts or tool outputs.
What systems are affected by CVE-2026-75912?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, AI coding assistants, developer tool integrations.
What is the CVSS score for CVE-2026-75912?
CVE-2026-75912 has a CVSS v3.1 base score of 7.4 (HIGH). The EPSS exploitation probability is 0.32%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0037 Data from Local System AML.T0051.001 Indirect AML.T0053 AI Agent Tool Invocation AML.T0086 Exfiltration via AI Agent Tool Invocation Compliance Controls Affected
What are the technical details?
Original Advisory
### Maintainer resolution The CodeWhale maintainers validated this report. The affected package ranges are recorded in the advisory metadata. Version 0.8.64 contains the fix in commit 9a34b5034d29f05d1f28fa61b04719ca6a741020. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below. # Argument Injection in `git_blame` Tool Allows Arbitrary File Read Without Approval ## Overview The `git_blame` tool in DeepSeek-TUI passes the model-supplied `rev` parameter unvalidated into the argv of `git blame`. `git blame` accepts `--contents=<file>`, which causes it to use the file's contents in place of the working tree and echo each line verbatim in the blame output. A `rev` value of `--contents=/path/to/secret` therefore exfiltrates the targeted file's contents into the tool result, which is returned to the model and displayed in the chat transcript. The tool is registered with `ApprovalRequirement::Auto` and declares `ToolCapability::ReadOnly`. The read is in-scope for the capability label, but the *target* of the read is not the user expects `git_blame` to read files inside the workspace, not arbitrary paths on the host. This is a sibling of the `git_show` argument-injection vulnerability filed separately, sharing the same root cause (missing `--end-of-options` sentinel and unvalidated `rev`). ## Impact Arbitrary file read at the privilege of the user running DeepSeek-TUI, via malicious repository content combined with prompt injection (the threat model already documented in CVE-2026-45311). Reachable as the invoking user: - `~/.ssh/id_rsa`, `~/.ssh/id_ed25519`, and other private keys - `~/.aws/credentials`, `~/.config/gh/hosts.yml`, `~/.netrc` - `.env` files anywhere in the filesystem - Any project file outside the workspace the tool would normally restrict to The leaked contents land in the model's context. The same model that obeyed the prompt-injection in step one can be instructed to forward the leak via `fetch_url` (network-policy permitting), summarize it in chat, or write it into a tool output the attacker can later retrieve. ## Technical Details ### Root Cause `crates/tui/src/tools/git_history.rs`: ```rust // L314-316 fn approval_requirement(&self) -> ApprovalRequirement { ApprovalRequirement::Auto } // L322-358 (excerpt) async fn execute(&self, input: Value, context: &ToolContext) -> Result<ToolResult, ToolError> { let path_str = required_str(&input, "path")?; let resolved_path = context.resolve_path(path_str)?; // path is bounded to workspace ... let rev = optional_str(&input, "rev").unwrap_or("HEAD"); // rev is NOT bounded ... let mut args = vec![ "blame".to_string(), "--date=iso".to_string(), format!("-L{start_line},{end_line}"), ]; if porcelain { args.push("--line-porcelain".to_string()); } args.push(rev.to_string()); // unvalidated, no sentinel args.push("--".to_string()); args.push(pathspec.display().to_string()); ... } ``` `path` correctly flows through `context.resolve_path`, which enforces workspace containment (`spec.rs:342`). `rev` does not and the `--` separator after `rev` only ends pathspec parsing, it does not stop option parsing of `rev` itself. The JSON schema for `rev` (L283-285) is `{"type": "string"}` with no constraints. ### Why `--contents` Works `git blame --contents=<file> -- <pathspec>` blames the working tree path *as if its contents were the supplied file*. Each line of the supplied file appears verbatim in the porcelain or human-readable output, prefixed with the attribution marker `00000000 (External file (--contents) <date> N)`. The full line content is preserved. Two secondary primitives in the same parser also leak data, with smaller yield: - `--ignore-revs-file=<file>` : surfaces parse errors that disclose partial content when the file is not a valid revs list. - `-S <file>`, `--reverse <rev1>..<rev2>` : not directly exploitable for read but expand the option surface that argv injection can reach. ## Proof of Concept Argv assembled by the tool with input `{"path": "a.txt", "rev": "--contents=/home/a/.ssh/id_rsa"}`: ``` git blame --date=iso -L1,200 --contents=/home/a/.ssh/id_rsa -- a.txt ``` Reproduced against system `git` as a non-root user: ``` $ id uid=1001(a) gid=1001(a) groups=1001(a) $ echo "PRIVATEKEYDATA" > /home/a/.ssh/id_rsa $ chmod 600 /home/a/.ssh/id_rsa $ git blame --date=iso -L1,5 "--contents=/home/a/.ssh/id_rsa" -- a.txt 00000000 (External file (--contents) 2026-05-19 07:05:51 -0400 1) PRIVATEKEYDATA ``` A non-readable target (`/etc/shadow`, owned by root with mode 0640) returns `Permission denied`, confirming the read is bounded by uid as expected; this is not a privilege boundary bypass, it is the desktop user's own filesystem view being exposed past the workspace boundary the tool's `path` argument otherwise enforces. End-to-end exploitation is identical to the `git_show` companion: malicious repo → `AGENTS.md` injection → model calls `git_blame` with the crafted `rev` → auto-approval → leaked content returned in tool output and consumed by the model. ## Remediation Same shape as the `git_show` fix: ```rust args.push("--end-of-options".to_string()); args.push(rev.to_string()); args.push("--".to_string()); args.push(pathspec.display().to_string()); ``` Plus a leading-hyphen rejection on `rev`. A regression test should pin both `rev = "--contents=/etc/passwd"` and `rev = "--ignore-revs-file=/etc/passwd"` as rejected inputs.
Exploitation Scenario
An attacker publishes or compromises a public git repository and plants an indirect prompt injection inside a file the AI coding agent reads as context (e.g., AGENTS.md). A developer opens the repository in DeepSeek-TUI and asks the agent something innocuous like 'summarize recent changes.' The injected instructions steer the model into calling the git_blame tool with input {'path': 'a.txt', 'rev': '--contents=/home/user/.ssh/id_rsa'}. Because the tool is auto-approved and only the 'path' argument is workspace-bounded, git assembles 'git blame --contents=/home/user/.ssh/id_rsa -- a.txt', which prints the private key content verbatim, attributed to a fake 'External file' commit. The leaked key now sits in the model's context window and chat transcript, where the same model — already compromised by the initial prompt injection — can be instructed to exfiltrate it further via a network-capable tool (fetch_url) or simply display it for the attacker to retrieve through a shared session or log.
Weaknesses (CWE)
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Primary
CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Primary
CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor: The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
- [Architecture and Design] Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N References
- github.com/Hmbown/CodeWhale/commit/9a34b5034d29f05d1f28fa61b04719ca6a741020
- github.com/Hmbown/CodeWhale/security/advisories/GHSA-c6mw-8xh8-gpq6
- github.com/advisories/GHSA-c6mw-8xh8-gpq6
- nvd.nist.gov/vuln/detail/CVE-2026-75912
- vulncheck.com/advisories/codewhale-before-argument-injection-via-git-blame
Timeline
Related Vulnerabilities
CVE-2026-45311 9.6 deepseek-tui: prompt injection enables zero-approval RCE
Same package: deepseek-tui CVE-2026-75913 9.3 Analysis pending
Same package: deepseek-tui CVE-2026-75856 8.6 deepseek-tui: SSRF via DNS-pinning TOCTOU bypass
Same package: deepseek-tui CVE-2026-75858 7.8 Analysis pending
Same package: deepseek-tui CVE-2026-75911 7.8 Analysis pending
Same package: deepseek-tui