CVE-2026-25063

N/A Unknown

📋 TL;DR

A command injection vulnerability in gradle-completion up to version 9.3.0 allows arbitrary code execution when users trigger Bash tab completion in projects with malicious Gradle build files. The vulnerability occurs because the script fails to properly sanitize Gradle task names and descriptions, allowing backtick-enclosed strings to be executed as commands during completion. This affects developers and system administrators using gradle-completion with Bash shell.

💻 Affected Systems

Products:
  • gradle-completion
Versions: All versions up to and including 9.3.0
Operating Systems: Linux, macOS, Unix-like systems with Bash
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Bash completion, not Zsh completion. Requires user to trigger tab completion in a directory with a malicious Gradle build file.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining the privileges of the user running bash completion, potentially leading to data theft, ransomware deployment, or lateral movement.

🟠

Likely Case

Local privilege escalation or execution of malicious commands in the context of the user's shell environment when they tab-complete Gradle commands in a compromised project.

🟢

If Mitigated

Limited impact if users only work with trusted Gradle projects or have restricted shell environments.

🌐 Internet-Facing: LOW - This requires local access to trigger tab completion in a malicious project.
🏢 Internal Only: MEDIUM - Developers working with untrusted Gradle projects or cloning repositories from untrusted sources are at risk.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the attacker to place a malicious Gradle build file in a project directory that the victim accesses. The victim must then trigger Bash tab completion in that directory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 9.3.1

Vendor Advisory: https://github.com/gradle/gradle-completion/security/advisories/GHSA-qggc-44r3-cjgv

Restart Required: No

Instructions:

1. Update gradle-completion to version 9.3.1 or later. 2. For manual update: git clone https://github.com/gradle/gradle-completion.git, copy the updated completion script to your bash completion directory. 3. Reload your shell or source the updated completion script.

🔧 Temporary Workarounds

Disable gradle-completion

linux

Temporarily remove gradle-completion from your Bash configuration to prevent exploitation

# Remove from .bashrc or .bash_profile
sed -i '/gradle-completion/d' ~/.bashrc ~/.bash_profile
# Then reload shell or run:
source ~/.bashrc

Switch to Zsh completion

linux

Use Zsh shell instead of Bash as the vulnerability doesn't affect Zsh completion

# Install Zsh if not present
sudo apt-get install zsh  # Debian/Ubuntu
sudo yum install zsh      # RHEL/CentOS
# Then switch default shell:
chsh -s $(which zsh)

🧯 If You Can't Patch

  • Only work with trusted Gradle projects from verified sources
  • Avoid using tab completion in directories with unfamiliar Gradle build files

🔍 How to Verify

Check if Vulnerable:

Check if gradle-completion version is 9.3.0 or earlier by examining the script header or checking installation method

Check Version:

grep -i 'version' $(which gradle-completion) 2>/dev/null || echo 'gradle-completion not found in PATH'

Verify Fix Applied:

Verify gradle-completion version is 9.3.1 or later. Test tab completion in a test directory with a Gradle build file containing backticks in task descriptions.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected command execution during shell tab completion
  • Suspicious processes spawned from bash completion context

Network Indicators:

  • Outbound connections from bash completion processes

SIEM Query:

process.name:bash AND process.args:*gradle* AND process.parent.name:bash

🔗 References

📤 Share & Export