Bug 2558803 - CVE-2026-111079 goose: goose: Shell History and Environment Leak via Terminal Integration [fedora-all]
Summary: CVE-2026-111079 goose: goose: Shell History and Environment Leak via Terminal...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: goose
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: RHEL Lightspeed Maint
QA Contact:
URL:
Whiteboard: {"flaws": ["20374db8-6aa5-4f5f-b228-d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-10-22 09:52 UTC by Rafael Pandini
Modified: 2026-11-07 01:39 UTC (History)
3 users (show)

Fixed In Version: goose-1.45.0-2.fc46
Clone Of:
Environment:
Last Closed: 2026-10-28 15:39:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rafael Pandini 2026-10-22 09:52:12 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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 GITHUB_PAT_VALUE" https://api.github.com/repos/private/repo

or:

aws configure set aws_secret_access_key AWS_SECRET_KEY_VALUE

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 AWS_SECRET_ACCESS_KEY=AWS_SECRET_KEY_VALUE
export GITHUB_TOKEN=GITHUB_PAT_VALUE
export DATABASE_URL=postgres://admin:SECRET_PASSWORD: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.

Comment 1 Fedora Update System 2026-10-28 11:25:53 UTC
FEDORA-2026-142a25f1ca (goose-1.45.0-2.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-142a25f1ca

Comment 2 Fedora Update System 2026-10-28 15:39:20 UTC
FEDORA-2026-142a25f1ca (goose-1.45.0-2.fc46) has been pushed to the Fedora 46 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Fedora Update System 2026-10-29 15:17:40 UTC
FEDORA-2026-ffdd457751 (goose-1.45.0-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ffdd457751

Comment 4 Fedora Update System 2026-10-29 15:17:54 UTC
FEDORA-2026-5778d995b3 (goose-1.45.0-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-5778d995b3

Comment 5 Fedora Update System 2026-10-29 15:17:59 UTC
FEDORA-2026-8121b4b9af (goose-1.45.0-2.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8121b4b9af

Comment 6 Fedora Update System 2026-10-29 22:46:28 UTC
FEDORA-2026-5778d995b3 has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-5778d995b3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-5778d995b3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2026-10-30 01:53:39 UTC
FEDORA-2026-ffdd457751 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-ffdd457751`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-ffdd457751

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2026-10-30 02:19:08 UTC
FEDORA-2026-8121b4b9af has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-8121b4b9af`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-8121b4b9af

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2026-11-06 01:16:38 UTC
FEDORA-2026-5778d995b3 (goose-1.45.0-2.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2026-11-06 01:29:20 UTC
FEDORA-2026-ffdd457751 (goose-1.45.0-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2026-11-07 01:39:12 UTC
FEDORA-2026-8121b4b9af (goose-1.45.0-2.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.