CVE-2025-58178: SonarSource/sonarqube scan action Command Injection Vulnerability
HIGHCVE-2025-58178 is a HIGH (CVSS 7.8) command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting SonarSource/sonarqube scan action libraries in the GitHub Actions ecosystem. The issue involves command injection via sonarqube-scan-action github action. Remediation is available by upgrading affected packages to version 5.3.1.
CVE-2025-58178 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-58178
To remediate this vulnerability, upgrade all affected SonarSource/sonarqube scan action dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade SonarSource/sonarqube-scan-action to 5.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for SonarSource/sonarqube-scan-action
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-58178, inspect your project dependencies for SonarSource/sonarqube scan action:
inspect dependencies for SonarSource/sonarqube-scan-action
Analyze the terminal output to locate any version of SonarSource/sonarqube scan action in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.3.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In SonarSource/sonarqube scan action, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-58178 Affected SonarSource/sonarqube scan action Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
SonarSource/sonarqube-scan-action
|
GitHub Actions |
≥ 4.0.0
< 5.3.1
|
5.3.1
|
References
Frequently Asked Questions
What is CVE-2025-58178?
Which SonarSource/sonarqube scan action versions are affected?
What version fixes CVE-2025-58178?
Is SonarSource/sonarqube-scan-action affected?
What is the CVSS score of CVE-2025-58178?
What CWE is associated with CVE-2025-58178?
How can I check GitHub Actions dependencies for CVE-2025-58178?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f79p-9c5r-xg88",
"modified" : "2025-09-02T17:31:57Z",
"published" : "2025-09-02T17:31:57Z",
"aliases" : [ "CVE-2025-58178" ],
"summary" : "Command Injection via sonarqube-scan-action GitHub Action",
"details" : "### Impact\nA command injection vulnerability was discovered in the SonarQube Scan GitHub Action that allows untrusted input arguments to be processed without proper sanitization. Arguments sent to the action are treated as shell expressions, allowing potential execution of arbitrary commands.\n\n### Patches\nA fix has been released in SonarQube Scan GitHub Action v5.3.1.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "GitHub Actions",
"name" : "SonarSource/sonarqube-scan-action"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "5.3.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.3.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/SonarSource/sonarqube-scan-action/security/advisories/GHSA-f79p-9c5r-xg88"
}, {
"type" : "WEB",
"url" : "https://github.com/SonarSource/sonarqube-scan-action/pull/200"
}, {
"type" : "WEB",
"url" : "https://github.com/SonarSource/sonarqube-scan-action/commit/016cabf33a6b7edf0733e179a03ad408ad4e88ba"
}, {
"type" : "WEB",
"url" : "https://community.sonarsource.com/t/security-advisory-sonarqube-scanner-github-action/147696"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/SonarSource/sonarqube-scan-action"
}, {
"type" : "WEB",
"url" : "https://sonarsource.atlassian.net/browse/SQSCANGHA-101"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-02T17:31:57Z",
"nvd_published_at" : null
}
}