CVE-2025-59844: SonarSource/sonarqube scan action Argument Injection Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-5xq9-5g24-4g6f
CWE-78
Published
Advisory Summary

CVE-2025-59844 is a HIGH argument injection vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting SonarSource/sonarqube scan action libraries in the GitHub Actions ecosystem. The issue involves argument injection vulnerability in sonarqube scan action. Remediation is available by upgrading affected packages to version 6.0.0.

CVE-2025-59844 at a Glance

CVE Identifier CVE-2025-59844
GHSA Identifier GHSA-5xq9-5g24-4g6f
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product SonarSource/sonarqube scan action
Package Ecosystem GitHub Actions
Published Date
Last Updated

How to Fix CVE-2025-59844

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.

SonarSource/sonarqube-scan-action fixed: 6.0.0
Upgrade SonarSource/sonarqube-scan-action to 6.0.0
Verify Direct and Transitive Dependencies

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-59844, 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 6.0.0), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os 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

A command injection vulnerability exists in SonarQube GitHub Action prior to v6.0.0 when workflows pass user-controlled input to the args parameter on Windows runners without proper validation. This vulnerability bypasses a previous security fix and allows arbitrary command execution, potentially leading to exposure of sensitive environment variables and compromise of the runner environment. ### Patches The vulnerability has been fixed in version v6.0.0. Users should upgrade to this version or later. ### Credits Francois Lajeunesse-Robert (Boostsecurity.io) ### References - Community Post: https://community.sonarsource.com/t/sonarqube-scanner-github-action-v6/149281 - Fix release: https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v6.0.0

CVE-2025-59844 Affected SonarSource/sonarqube scan action Versions

1 component(s)
Fixed Versions:
6.0.0
Product / Package Ecosystem Affected Versions Fixed Version
SonarSource/sonarqube-scan-action
GitHub Actions
≥ 4.0.0
< 6.0.0
6.0.0

References

Frequently Asked Questions

What is CVE-2025-59844?
CVE-2025-59844 is a security vulnerability in SonarSource/sonarqube scan action involving Argument injection vulnerability in SonarQube Scan Action under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which SonarSource/sonarqube scan action versions are affected?
Affected versions include releases prior to 6.0.0 across affected packages: SonarSource/sonarqube-scan-action.
What version fixes CVE-2025-59844?
Upgrading to 6.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is SonarSource/sonarqube-scan-action affected?
Yes, SonarSource/sonarqube-scan-action is affected in releases prior to 6.0.0. Upgrade your dependency to 6.0.0 or later.
What CWE is associated with CVE-2025-59844?
CVE-2025-59844 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check GitHub Actions dependencies for CVE-2025-59844?
Run the dependency tree command: 'inspect dependencies for SonarSource/sonarqube-scan-action'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5xq9-5g24-4g6f",
  "modified" : "2025-09-29T14:23:15Z",
  "published" : "2025-09-26T13:01:10Z",
  "aliases" : [ "CVE-2025-59844" ],
  "summary" : "Argument injection vulnerability in SonarQube Scan Action",
  "details" : "A command injection vulnerability exists in SonarQube GitHub Action prior to v6.0.0 when workflows pass user-controlled input to the args parameter on Windows runners without proper validation. This vulnerability bypasses a previous security fix and allows arbitrary command execution, potentially leading to exposure of sensitive environment variables and compromise of the runner environment.\n\n\n### Patches\nThe vulnerability has been fixed in version v6.0.0. Users should upgrade to this version or later.\n\n\n### Credits\nFrancois Lajeunesse-Robert (Boostsecurity.io)\n\n\n### References\n- Community Post: https://community.sonarsource.com/t/sonarqube-scanner-github-action-v6/149281 \n- Fix release: https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v6.0.0",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "GitHub Actions",
      "name" : "SonarSource/sonarqube-scan-action"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "6.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SonarSource/sonarqube-scan-action/security/advisories/GHSA-5xq9-5g24-4g6f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59844"
  }, {
    "type" : "WEB",
    "url" : "https://community.sonarsource.com/t/sonarqube-scanner-github-action-v6/149281"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SonarSource/sonarqube-scan-action"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v6.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-26T13:01:10Z",
    "nvd_published_at" : "2025-09-26T17:15:36Z"
  }
}