Overview
A significant flaw has been identified in SonarQube Scan GitHub Action versions 4 to 5.3.0. The vulnerability, designated as CVE-2025-58178, is a high-risk security flaw due to the potential for command injection and could affect a broad range of organizations utilizing SonarQube for static analysis and code quality control. This vulnerability poses a severe threat to system security and data integrity.
Vulnerability Summary
CVE ID: CVE-2025-58178
Severity: High (CVSS: 7.8)
Attack Vector: Network
Privileges Required: None
User Interaction: None Required
Impact: Potential for system compromise and data leakage
Affected Products
Product | Affected Versions
SonarQube Server | 4 to 5.3.0
SonarQube Cloud | 4 to 5.3.0
How the Exploit Works
The flaw lies in the SonarQube Scan GitHub Action, which fails to adequately sanitize input arguments, treating them as shell expressions. This lack of proper input validation allows an attacker to inject arbitrary commands, which will then be executed by the system. This could lead to unauthorized system access or data leakage.
Conceptual Example Code
A conceptual example of how this vulnerability might be exploited could involve sending a malicious payload embedded within an argument to the SonarQube Scan GitHub Action. The argument, treated as a shell expression, might then execute an arbitrary command, compromising system security. Below is a hypothetical example:
sonarqube-scan --target "example.com; rm -rf /"
In this example, the injected command `rm -rf /` would cause the deletion of all files in the system.
