CVE-2026-129128 in Goose
Summary
by MITRE • 11/13/2026
Goose CLI 1.35.0 before 1.53.0 contains a local code execution vulnerability that allows attackers to run commands by setting diff.external in a repository's .git/config. Attackers can ship a crafted repository that, when the victim runs goose review, executes git diff without --no-ext-diff, running commands as the user and exposing credentials and provider API keys.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/13/2026
The vulnerability identified within Goose CLI versions prior to 1.53.0 represents a critical local code execution flaw rooted in improper handling of Git configuration parameters during repository review operations. This security issue specifically targets users who utilize the goose review command, which is designed to analyze and process changes within a Git repository. The core technical failure lies in how Goose invokes external diff tools when processing these repositories. Specifically, the application fails to enforce the --no-ext-diff flag when calling git diff commands that rely on externally configured diff handlers. This omission allows an attacker who controls or distributes a maliciously crafted Git repository to inject arbitrary system commands into the execution flow of the victim's environment.
The mechanism of exploitation relies on the interaction between Goose CLI and the underlying Git version control system. When a user opens a repository, Goose reads the .git/config file located within that repository. An attacker can populate this configuration file with a malicious value for the diff.external parameter. This parameter instructs Git to use an external script or program instead of its built-in diff algorithm whenever a difference is computed. Because Goose CLI does not explicitly disable these external extensions by passing the --no-ext-diff argument, it blindly trusts and executes whatever command is defined in the repository's configuration. Consequently, when the victim runs goose review, the application triggers git diff, which subsequently launches the attacker-controlled script as the currently authenticated user.
The operational impact of this vulnerability is severe due to its potential for credential theft and unauthorized system access. Since the malicious commands are executed with the privileges of the local user running Goose CLI, an attacker can leverage this execution context to exfiltrate sensitive data stored on the victim's machine. This includes environment variables containing cloud provider API keys, SSH private keys, authentication tokens, and other secrets that developers typically store locally for convenience or automation purposes. The attack vector is particularly insidious because it does not require network-based interaction; a user can be compromised simply by cloning or opening a repository provided by an untrusted source, such as through social engineering or malicious open-source contributions.
From a classification perspective, this vulnerability aligns with CWE-78, which describes Improper Neutralization of Special Elements used in an OS Command, commonly known as OS Command Injection. The flaw arises from the application's failure to sanitize inputs derived from local configuration files before passing them to system-level commands. Furthermore, within the MITRE ATT&CK framework, this behavior corresponds to T1059, specifically sub-techniques related to command and script interpreters such as T1059.004 for Unix Shell Commands or T1059.007 for PowerShell if applicable in Windows environments. The attack also exhibits characteristics of CWE-20, Improper Input Validation, as the application accepts configuration data from an untrusted source without adequate verification of its safety or integrity before execution.
Mitigation strategies must focus on both immediate remediation and long-term defensive coding practices. The primary solution is to upgrade Goose CLI to version 1.53.0 or later, where this specific code path has been patched to ensure that external diff extensions are disabled during review operations. For organizations unable to immediately update their tooling, a temporary workaround involves enforcing strict policies on repository configurations and educating developers about the risks of executing commands from untrusted repositories. Additionally, security teams should implement monitoring for unusual process executions originating from Git-related binaries or code analysis tools to detect potential exploitation attempts in real-time. Ensuring that development environments operate with least-privilege principles can also limit the damage if such an execution occurs by restricting access to sensitive credential stores and API keys.