CVE-2023-27327
Executive Summary
CVE-2023-27327 is a Time-of-Check Time-of-Use (TOCTOU) local privilege escalation vulnerability in Parallels Desktop's Toolgate component. The flaw allows an attacker who has already achieved high-privileged code execution within a guest virtual machine to break out of the guest and execute arbitrary code on the host system with the privileges of the current user. The vulnerability stems from improper locking when performing operations on an object, enabling a race condition that can be exploited to escalate privileges. With a CVSS score of 7.5, this is a high-severity issue that poses a significant risk to virtualized environments, particularly those using Parallels Desktop for development, testing, or production workloads. No public exploit code or proof-of-concept is currently available, but the technical details suggest a complex attack chain requiring initial guest compromise.
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 packages. It is a native binary vulnerability in the Parallels Desktop hypervisor software, specifically in the Toolgate component responsible for guest-host communication.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
- Base Score: 7.5 (High)
- Attack Vector: Local (AV:L) – The attacker must have local access to the guest system.
- Attack Complexity: High (AC:H) – Exploitation requires precise timing and a race condition.
- Privileges Required: High (PR:H) – The attacker needs high-privileged code execution in the guest.
- User Interaction: None (UI:N) – No user action is required on the host.
- Scope: Changed (S:C) – The vulnerability allows an attacker to impact resources beyond the guest (the host).
- Confidentiality Impact: High (C:H) – Full host data access.
- Integrity Impact: High (I:H) – Full host data modification.
- Availability Impact: High (A:H) – Potential host denial of service.
Threat Level: High. While the attack complexity is high and requires prior guest compromise, a successful exploit results in full host compromise, making it a critical risk for environments where guest isolation is paramount.
Deep Dive & Mechanics
The vulnerability resides in the Toolgate component of Parallels Desktop. Toolgate is a set of drivers and services that facilitate communication between the guest operating system and the host hypervisor. It handles operations such as clipboard sharing, file drag-and-drop, time synchronization, and other virtualization features.
The specific flaw is a Time-of-Check Time-of-Use (TOCTOU) race condition. The Toolgate component performs a security check on an object (e.g., verifying that a memory region belongs to the guest) but does not properly lock that object during the check. This creates a window where an attacker, with high privileges in the guest, can modify the object after the check passes but before the operation is performed.
Attack Flow:
- Initial Compromise: The attacker gains high-privileged code execution within the guest VM (e.g., via a separate guest OS vulnerability or by being an administrator).
- Race Condition Setup: The attacker identifies a Toolgate operation that performs a TOCTOU check. They then spawn two concurrent threads:
- Thread A: Continuously triggers the Toolgate operation, passing a legitimate object for the security check.
- Thread B: Continuously modifies the object to point to a host memory region or a privileged resource.
- Exploitation: When Thread A's check passes, Thread B quickly swaps the object. The Toolgate component then performs the operation on the attacker-controlled object, allowing the attacker to read/write host memory or execute code on the host.
- Privilege Escalation: The attacker leverages this host-level access to execute arbitrary code in the context of the current user on the host system, effectively breaking out of the VM.
Vulnerable vs. Patched Code
No official patch or patched code is available for this CVE. The vulnerability is unpatched as of the latest information. The following is a conceptual representation of the vulnerable code pattern.
Vulnerable Code (Conceptual C-like pseudocode):
// Toolgate operation handler
void toolgate_handle_operation(Operation *op) {
// TOCTOU vulnerability: no lock held during check
if (is_guest_owned(op->memory_region)) {
// Race window: attacker can modify op->memory_region here
perform_operation(op->memory_region);
}
}
Patched Code (Conceptual):
// Toolgate operation handler (patched)
void toolgate_handle_operation(Operation *op) {
// Proper locking to prevent TOCTOU
lock(&op->lock);
if (is_guest_owned(op->memory_region)) {
perform_operation(op->memory_region);
}
unlock(&op->lock);
}
The patched version would acquire a lock on the operation object before performing the security check and release it only after the operation is complete, eliminating the race window.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A vulnerable version of Parallels Desktop (version unknown, but likely < 18.x or < 19.x).
- High-privileged code execution within the guest VM (e.g., root on Linux, SYSTEM on Windows).
- Knowledge of the Toolgate API and the specific operation vulnerable to TOCTOU.
Exploitation Steps:
- Identify the Vulnerable Operation: Reverse engineer the Toolgate driver to find an operation that performs a TOCTOU check. This typically involves looking for patterns where a pointer or handle is validated and then used without re-validation.
- Set Up the Race: Write a kernel-mode driver or use a user-space exploit with high privileges to create two threads.
- Thread A (Trigger): Continuously calls the vulnerable Toolgate operation with a legitimate guest-owned object.
- Thread B (Swapper): Continuously modifies the object to point to a host memory region (e.g., the host kernel's
EPROCESSstructure or a critical host driver). - Win the Race: With enough iterations, the race condition will be won, and the Toolgate component will perform the operation on the host memory.
- Escalate to Host: Use the host memory access to overwrite a function pointer or modify a process token to gain code execution on the host.
No public exploit code is available for this CVE.
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual race condition patterns in Toolgate operations (e.g., high frequency of failed operations followed by a success).
- Look for guest processes that are spawning multiple threads and rapidly interacting with the Toolgate driver.
- Use host-based EDR to detect unexpected memory access patterns from the hypervisor process (e.g.,
prl_hypervisororprl_tools).
Defense:
- Isolate Critical VMs: Do not run untrusted code in VMs that have access to sensitive host data.
- Limit Guest Privileges: Avoid granting high privileges to guest users unless absolutely necessary.
- Monitor Toolgate Activity: Enable logging for Toolgate operations and alert on anomalies.
- Apply Vendor Patches: Once Parallels releases a patch, apply it immediately.
Indicators of Compromise (IOCs)
- File Hashes (SHA-256): No specific hashes available.
- Process Names:
prl_hypervisor,prl_tools,prl_cc - Network Indicators: None (local vulnerability).
- Registry/File System Changes: Modifications to Toolgate driver files (e.g.,
C:\Program Files\Parallels\Parallels Tools\Drivers\Toolgate\). - Behavioral IOCs:
- High rate of Toolgate IOCTL calls from a single guest process.
- Unexpected memory writes to host kernel regions from the hypervisor process.
- Guest processes with multiple threads performing rapid object swaps.
Detection Engineering
YARA Rule
rule CVE_2023_27327_TOCTOU_Toolgate {
meta:
description = "Detects potential exploitation of CVE-2023-27327 in Parallels Desktop Toolgate"
author = "Valters IT"
date = "2025-04-10"
hash = "unknown"
strings:
$s1 = "Toolgate" ascii wide nocase
$s2 = "TOCTOU" ascii wide nocase
$s3 = "race" ascii wide nocase
$s4 = "prl_hypervisor" ascii wide nocase
$s5 = "prl_tools" ascii wide nocase
condition:
any of ($s1, $s2, $s3, $s4, $s5)
}
Sigma Rule
title: CVE-2023-27327 Parallels Desktop Toolgate TOCTOU Exploitation
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of CVE-2023-27327 via high-frequency Toolgate IOCTL calls
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\prl_hypervisor.exe'
- '\prl_tools.exe'
CommandLine|contains: 'Toolgate'
condition: selection
falsepositives:
- Legitimate Parallels Desktop operations
level: high
Suricata Rule
alert ip any any -> any any (msg:"CVE-2023-27327 Parallels Desktop Toolgate TOCTOU Exploitation Attempt"; content:"Toolgate"; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate VMs: If possible, run untrusted or high-risk VMs on a separate host without sensitive data.
- Restrict Guest Privileges: Ensure that guest users do not have high-privileged access unless required.
- Monitor for Exploitation: Deploy the provided YARA, Sigma, and Suricata rules to detect potential exploitation attempts.
Long-Term Fix:
- Apply Vendor Patch: Monitor Parallels' official channels for a security update. Once released, apply it immediately to all affected installations.
- Upgrade Parallels Desktop: Upgrade to the latest version of Parallels Desktop, which may include fixes for this vulnerability.
- Consider Alternative Hypervisors: If the risk is unacceptable, consider using alternative virtualization solutions with stronger isolation guarantees.
Workarounds:
- Disable Toolgate: If Toolgate functionality is not required, disable it in the VM settings. This will break guest-host integration features but will eliminate the attack vector.
- Use Network Isolation: Place the host on a separate network segment to limit the blast radius of a potential host compromise.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.