Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-25063: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in gradle gradle-completion

0
High
VulnerabilityCVE-2026-25063cvecve-2026-25063cwe-78cwe-157
Published: Thu Jan 29 2026 (01/29/2026, 21:47:16 UTC)
Source: CVE Database V5
Vendor/Project: gradle
Product: gradle-completion

Description

gradle-completion provides Bash and Zsh completion support for Gradle. A command injection vulnerability was found in gradle-completion up to and including 9.3.0 that allows arbitrary code execution when a user triggers Bash tab completion in a project containing a malicious Gradle build file. The `gradle-completion` script for Bash fails to adequately sanitize Gradle task names and task descriptions, allowing command injection via a malicious Gradle build file when the user completes a command in Bash (without them explicitly running any task in the build). For example, given a task description that includes a string between backticks, then that string would be evaluated as a command when presenting the task description in the completion list. While task execution is the core feature of Gradle, this inherent execution may lead to unexpected outcomes. The vulnerability does not affect zsh completion. The first patched version is 9.3.1. As a workaround, it is possible and effective to temporarily disable bash completion for Gradle by removing `gradle-completion` from `.bashrc` or `.bash_profile`.

AI-Powered Analysis

AILast updated: 01/29/2026, 22:12:07 UTC

Technical Analysis

The vulnerability CVE-2026-25063 affects gradle-completion, a tool providing Bash and Zsh command-line completion support for Gradle builds. Specifically, versions prior to 9.3.1 contain a command injection flaw in the Bash completion script. When a user triggers tab completion in Bash within a Gradle project, the script enumerates Gradle tasks and their descriptions to present completion options. However, the script fails to properly sanitize task names and descriptions, particularly those containing strings enclosed in backticks (`). In Bash, backticks denote command substitution, so any command embedded within backticks in a task description is executed by the shell during completion. This allows an attacker who can inject a malicious Gradle build file with crafted task descriptions to execute arbitrary OS commands on the victim’s machine when the victim uses Bash tab completion. The vulnerability does not require explicit task execution, only the invocation of tab completion, which is a common developer action. The flaw does not affect Zsh completion, which properly handles such input. Exploitation requires local access and user interaction (triggering tab completion) and assumes the user has privileges to run Gradle commands. The vulnerability impacts confidentiality, integrity, and availability since arbitrary code execution can lead to data theft, system compromise, or denial of service. The issue was patched in gradle-completion version 9.3.1. As an interim mitigation, disabling Bash completion for Gradle by removing the gradle-completion script from shell initialization files (.bashrc or .bash_profile) prevents exploitation. No known active exploits have been reported in the wild to date.

Potential Impact

For European organizations, this vulnerability primarily threatens development environments where Gradle is used with Bash shells. Successful exploitation can lead to arbitrary code execution with the privileges of the user running Bash, potentially compromising developer workstations or build servers. This can result in theft of sensitive source code, insertion of malicious code into builds, or disruption of development pipelines. Organizations relying on continuous integration systems or automated builds using Gradle with Bash completion enabled may face elevated risk. The vulnerability could also be leveraged for lateral movement within internal networks if attackers gain initial access. Confidentiality is at risk due to potential data exfiltration, integrity is compromised by unauthorized code execution, and availability may be affected by destructive payloads. The requirement for local user interaction and privileges limits remote exploitation but insider threats or social engineering could facilitate attacks. The lack of impact on Zsh users reduces the attack surface somewhat. Overall, the vulnerability poses a significant risk to European software development and build environments that have not updated to the patched version or applied mitigations.

Mitigation Recommendations

1. Upgrade gradle-completion to version 9.3.1 or later immediately to apply the official patch that properly sanitizes task names and descriptions. 2. As a temporary workaround, disable Bash completion for Gradle by removing or commenting out the gradle-completion script invocation in user shell initialization files such as .bashrc or .bash_profile. 3. Educate developers and build engineers about the risk of opening projects with untrusted or unknown Gradle build files, especially when using Bash tab completion. 4. Implement strict code review and repository access controls to prevent malicious Gradle build files from entering trusted codebases. 5. Monitor developer workstations and build servers for unusual command execution or process activity that could indicate exploitation attempts. 6. Encourage use of Zsh or other shells not affected by this vulnerability as an interim mitigation. 7. Restrict local user privileges where possible to limit the impact of arbitrary code execution. 8. Integrate vulnerability scanning and dependency checks into CI/CD pipelines to detect outdated gradle-completion versions. 9. Maintain updated backups of critical development environments to enable recovery in case of compromise.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-28T14:50:47.889Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 697bd7ddac06320222bd31b6

Added to database: 1/29/2026, 9:57:49 PM

Last enriched: 1/29/2026, 10:12:07 PM

Last updated: 2/5/2026, 12:30:31 PM

Views: 21

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats