CVE-2026-111079: Goose: goose: shell history and environment leak via terminal integration

Published Oct 16, 2026
·
Updated

A flaw was found in Goose. When the terminal integration feature is enabled, the application captures shell command history and sends it verbatim without sanitization to configured Large Language Model (LLM) provider endpoints during queries. If a user enters sensitive data—such as API tokens, passwords, or environment variables containing secrets—in the terminal, this unredacted information is transmitted across trust boundaries. This can lead to sensitive information disclosure, exposing confidential credentials to external service providers and logs.

Other sources

Goose's @goose terminal integration (goose term) installs a shell preexec hook that logs every command the user types. When the user later invokes @goose, all logged commands since the last assistant response are sent verbatim — without any sanitization — as context to the configured LLM provider endpoint.

Credentials entered in the terminal (bearer tokens, API keys, passwords passed as command arguments or set via export) leave the user's machine and enter a system outside their control, where they may be logged, retained under the provider's data-retention policy, or accessed by provider employees or infrastructure compromises. Affected Versions

- Introduced in: commit 5f50198318e6edc502b96187ab647119d9daab3b (PR #5887) https://github.com/aaif-goose/goose/commit/5f50198318e6edc502b96187ab647119d9daab3b - First released in: v1.16.0 - Affected through: v1.54.0 - Affected releases: 58 versions (v1.16.0 – v1.54.0) - Attribution - This issue was discovered by these engineers: Rodolfo Olivieri (Red Hat), Manuel Moran (Red Hat), and Theofanis Petkos (Red Hat, GitHub account https://github.com/thepetk).

Vulnerable Code Full details in this tab, if needed. Examples of impact Scenario 1: Long-lived API keys and personal access tokens in commands A user passes a long-lived credential as a command-line argument:

curl -H "Authorization: token GITHUBPATVALUE" https://api.github.com/repos/private/repo

or:

aws configure set awssecretaccesskey AWSSECRETKEYVALUE

These are not short-lived bearer tokens — GitHub Personal Access Tokens (classic) do not expire by default, and AWS access keys persist until explicitly rotated. A single disclosure can grant indefinite access.

Later in the same session, the user asks Goose an entirely unrelated question:

@goose what does the -r flag do in cp?

The question has no relation to the earlier commands and does not require shell context.

Goose unconditionally reads the shell history — including the command with the long-lived credential — and sends it as-is to the configured LLM endpoint. Every @goose invocation includes all shell history since the last response, regardless of whether the question is related to prior commands. The credential now exists in a system outside the user's control (LLM provider logs, data-retention storage, etc.). Anyone who later gains access to those logs can reuse the credential to authenticate as the user. Because these credentials are long-lived, the window of exploitation persists until the user discovers the leak and manually rotates the credential. Scenario 2: Environment variable assignments with secrets A user sets credentials as environment variables in their terminal for use by CLI tools:

export AWSSECRETACCESSKEY=AWSSECRETKEYVALUE export GITHUBTOKEN=GITHUBPATVALUE export DATABASEURL=postgres://admin:SECRETPASSWORD:5432/app

The preexec hook captures each export command verbatim.

The user later asks Goose something completely unrelated to the environment setup:

@goose what does the -r flag do in cp?

Goose unconditionally sends the full shell history — including every export statement — to the LLM provider. The question's topic is irrelevant; all history since the last response is always included. The attacker now has not just one credential but potentially a full set of secrets: cloud provider keys, database connection strings with embedded passwords, API tokens for third-party services. A single @goose invocation can leak an entire working environment's secrets in one request.

— Red Hat

Affected Software

1 affected component
Block Goose>=1.16.0<=1.54.0

Event History

Oct 16, 2026
Data Sourced
via Red Hat·11:20 AM
DescriptionSeverityAffected Software
Oct 22, 2026
CVE Published
via MITRE·10:18 AM
Data Sourced
via MITRE·10:18 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this disclosure?

Users who have enabled Goose terminal integration and use @goose after entering sensitive values in their shell are exposed. Commands logged since the previous assistant response can be sent to the configured LLM provider endpoint.

2

What information can leave the local machine?

Shell commands are sent verbatim without sanitization. This can include bearer tokens, API keys, passwords supplied as command arguments, and secrets assigned through export or other environment-variable commands.

3

What can be done while a fix is not available?

Avoid invoking @goose after entering credentials or other sensitive data in the terminal while terminal integration is enabled. Treat commands entered since the last assistant response as potentially included in the next @goose query.

4

How can I determine whether my workflow is affected?

The affected integration is @goose terminal integration, installed with goose term, which adds a shell preexec hook to log commands. If it is enabled and @goose is invoked, commands logged since the last assistant response are included as query context.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203