/

CVE-2026-129128

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in Goose CLI Git Review

CVE-2026-129128

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Local Code Execution

Severity:

HIGH RISK

(7.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

Goose CLI can execute commands configured through a repository's Git settings when a user runs goose review on a crafted repository. Those commands run with the user's privileges, potentially exposing credentials and provider API keys.

Affected context

The vulnerability affects Goose CLI's Git review workflow when it runs git diff without disabling external diff behavior. A repository's .git/config can define an external diff command, so the issue becomes risky when a user reviews an untrusted repository and Git honors that setting.

Exploit preconditions

  • Attack surface: Local execution through the Goose CLI Git review workflow
  • Required access: The attacker must be able to provide or influence a repository that the victim reviews
  • Trigger point: The victim runs goose review on that repository
  • Why exploitation is possible: Git may honor the repository's diff.external setting when Goose invokes git diff without disabling external diff behavior

Why this happens

The underlying issue is that Goose invokes Git in a way that can honor repository-controlled external diff configuration. This allows untrusted repository metadata to influence command execution rather than being treated only as data. It maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because attacker-influenced input reaches an operating-system command execution path without adequately restricting its behavior.

Potential impact

  • Commands may execute with the privileges of the user running Goose
  • Local files or credentials accessible to that user could be exposed
  • Provider API keys or other secrets available in the environment could be accessed
  • The compromised environment could be used for further unauthorized activity

General mitigation guidance

Defensive patterns focus on preventing repository-controlled Git settings from triggering external commands.

  • Disable external diff behavior when invoking Git on untrusted repositories
  • Use controlled Git configuration and avoid inheriting settings from untrusted repository metadata
  • Treat repositories and their configuration as untrusted input during review workflows
  • Limit the credentials and privileges available to review processes
  • Consider isolated environments for inspecting untrusted repositories

How teams detect issues like this

  • Use static analysis and code review to identify Git command invocations that may honor repository-local configuration
  • Check whether review workflows explicitly disable external diff behavior for untrusted repositories
  • Review policies governing which Git configuration sources command-line tools may trust
  • Add automated checks that flag subprocess calls whose behavior can be controlled by repository metadata

Sources

SourceLink
github.comgithub.com/aaif-goose/goose
github.comgithub.com/aaif-goose/goose/blob/302b60806639ea9f0ae8f053f49f8bf0e88b26f4/crates/goose-cli/src/commands/review/handler.rs#L400
github.comgithub.com/aaif-goose/goose/commit/3fbea00fd44f6496ee4afe2b8b2897c3c95d63e9
github.comgithub.com/aaif-goose/goose/issues/12960
github.comgithub.com/aaif-goose/goose/pull/12537
github.comgithub.com/aaif-goose/goose/pull/13469
github.comgithub.com/aaif-goose/goose/releases/tag/v1.53.0
vulncheck.comvulncheck.com/advisories/goose-cli-1.35.0-before-1.53.0-command-execution-via-goose-review-diff-external

Frequently asked

questions

The vulnerability is triggered locally: a victim must run Goose's review workflow on a repository whose Git configuration can influence the diff operation.

An attacker needs a way to provide or influence a repository that the victim will review. The attacker does not necessarily need access to the victim's machine beforehand.

Ensure Git review operations cannot invoke external diff commands based on repository-controlled settings, and use controlled configuration when processing untrusted repositories.

Treat repository metadata as untrusted, audit subprocess calls for configuration-dependent behavior, and limit the privileges and secrets available to tools that inspect untrusted code.

Find out what's already
exploitable in your codebase.