CVE-2026-26189 Trivy Action has a script injection via sourced env file in composite action

Medium 5.9 Published Updated

Attackers can execute arbitrary commands in GitHub Actions runners by injecting shell metacharacters into Trivy Action inputs.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-26189?

CVE-2026-26189 is a medium-severity command injection vulnerability in aquasecurity trivy-action, published on 19 Feb 2026. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Trivy Action runs Trivy as GitHub action to scan a Docker container image for vulnerabilities. A command injection vulnerability exists in `aquasecurity/trivy-action` versions 0.31.0 through 0.33.1 due to improper handling of action inputs when exporting environment variables. The action writes `export VAR=<input>` lines to `trivy_envs.txt` based on user-supplied inputs and subsequently sources this file in `entrypoint.sh`. Because input values are written without appropriate shell escaping, attacker-controlled input containing shell metacharacters (e.g., `$(...)`, backticks, or other command substitution syntax) may be evaluated during the sourcing process. This can result in arbitrary command execution within the GitHub Actions runner context. Version 0.34.0 contains a patch for this issue. The vulnerability is exploitable when a consuming workflow passes attacker-controlled data into any action input that is written to `trivy_envs.txt`. Access to user input is required by the malicious actor. Workflows that do not pass attacker-controlled data into `trivy-action` inputs, workflows that upgrade to a patched version that properly escapes shell values or eliminates the `source ./trivy_envs.txt` pattern, and workflows where user input is not accessible are not affected.

Weakness: CWE-78

Which versions are affected by CVE-2026-26189?

1 open source package ship an affected version, including aquasecurity/trivy-action. It affects 1 product.

PackageAffectedFixed in
aquasecurity/trivy-action GitHub ActionsFrom 0.31.00.34.0

Products include Aquasec Trivy Action.

How do I fix CVE-2026-26189?

Upgrade aquasecurity/trivy-action to 0.34.0 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-26189 being exploited?

There is no known exploitation of CVE-2026-26189 in the wild and no public exploit code.

Sources

Also known as GHSA-9p44-j4g5-cfx5.

Is CVE-2026-26189 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free