CVE-2020-37020 Overview
CVE-2020-37020 is an unquoted service path vulnerability affecting SonarQube 8.3.1 that allows local attackers to escalate privileges to SYSTEM level on Windows systems. The vulnerability exists in the service executable path configuration, where improper quoting of the service binary path enables attackers to place malicious executables in strategic locations that will be executed with elevated privileges when the service restarts.
Critical Impact
Local attackers with limited user privileges can achieve SYSTEM-level code execution by exploiting the unquoted service path, potentially leading to complete system compromise.
Affected Products
- SonarQube 8.3.1
- SonarQube versions using unquoted Windows service paths
- Windows installations of SonarQube with default service configurations
Discovery Timeline
- 2026-01-29 - CVE CVE-2020-37020 published to NVD
- 2026-01-29 - Last updated in NVD database
Technical Details for CVE-2020-37020
Vulnerability Analysis
This vulnerability is classified under CWE-428 (Unquoted Search Path or Element), a well-known Windows-specific security issue. When a Windows service is configured with a path containing spaces that is not enclosed in quotation marks, the Windows Service Control Manager (SCM) interprets the path in a specific manner that can be exploited by attackers.
The core issue lies in how Windows parses executable paths. When the service path is unquoted and contains spaces, Windows attempts to locate the executable by progressively parsing the path at each space character. For example, if the service path is C:\Program Files\SonarQube\bin\windows-x86-64\wrapper.exe, Windows will first attempt to execute C:\Program.exe, then C:\Program Files\SonarQube\bin\windows-x86-64\wrapper.exe if the former doesn't exist.
Root Cause
The root cause of this vulnerability is the improper configuration of the Windows service registration for SonarQube. The installer or configuration script failed to wrap the service executable path in double quotes, leaving the path vulnerable to path interpretation attacks. This is a common oversight in Windows application installations where service paths traverse directories with spaces in their names, such as Program Files.
Attack Vector
The attack requires local access to the system where SonarQube is installed. An attacker with write permissions to directories in the unquoted path (such as C:\ or C:\Program Files\SonarQube\bin\) can place a malicious executable named appropriately (e.g., Program.exe or SonarQube.exe) in one of these locations. When the SonarQube service restarts—either through manual restart, system reboot, or triggered crash—Windows will execute the attacker's malicious binary with SYSTEM privileges instead of the legitimate service executable.
The attack flow involves identifying the unquoted service path using tools like wmic service get name,pathname or querying the Windows registry, determining which directory the attacker has write access to, placing a malicious executable with the appropriate name in that directory, and then triggering a service restart to achieve code execution with SYSTEM privileges.
Technical details and proof-of-concept information can be found at the Exploit-DB #48677 advisory.
Detection Methods for CVE-2020-37020
Indicators of Compromise
- Unexpected executable files appearing in root directories or intermediate path locations (e.g., C:\Program.exe, C:\Program Files\SonarQube.exe)
- Unusual process creation events with SYSTEM privileges originating from atypical file locations
- Modified service configurations or registry entries related to SonarQube service paths
- File system audit logs showing write operations to directories along the SonarQube service path
Detection Strategies
- Query Windows services for unquoted paths using wmic service get name,pathname | findstr /i /v """ to identify vulnerable services
- Monitor process creation events for executables running from unexpected locations with SYSTEM privileges
- Implement file integrity monitoring on directories commonly targeted by unquoted path attacks
- Use SentinelOne's behavioral AI to detect anomalous process spawning patterns from service contexts
Monitoring Recommendations
- Enable Windows Security Event logging for service start/stop events (Event IDs 7035, 7036)
- Configure file system auditing on potential hijack locations such as C:\ and intermediate service path directories
- Deploy endpoint detection rules to alert on new executable creation in system-critical directories
- Regularly audit Windows service configurations for unquoted paths as part of security hardening assessments
How to Mitigate CVE-2020-37020
Immediate Actions Required
- Audit the SonarQube service registration to identify unquoted paths using sc qc SonarQube or Windows Services management console
- Update the service path to include proper quotation marks around the full executable path
- Restrict write permissions on directories in the service path to administrators only
- Consider temporarily disabling the SonarQube service until the path is corrected if immediate remediation is not possible
Patch Information
Organizations should update to the latest version of SonarQube that addresses this service path configuration issue. Consult the SonarQube Official Site for the latest security updates and version information. Additionally, review the VulnCheck SonarQube Advisory for detailed remediation guidance.
Workarounds
- Manually correct the service path by modifying the registry key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SonarQube to include quotes around the ImagePath value
- Implement strict access controls on the C:\ drive and Program Files directories to prevent unauthorized write access
- Deploy application whitelisting solutions to prevent unauthorized executables from running with elevated privileges
- Use SentinelOne's exploit prevention capabilities to block malicious process execution from hijacked service paths
# Configuration example - Fix unquoted service path via registry
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SonarQube" /v ImagePath /t REG_EXPAND_SZ /d "\"C:\Program Files\SonarQube\bin\windows-x86-64\wrapper.exe\" -s \"C:\Program Files\SonarQube\conf\wrapper.conf\"" /f
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

