Summary
Claude Desktop for Windows contained a flaw in the CoworkVMService component, which runs as SYSTEM and failed to verify that a user-writable VM bundle location was a real directory rather than an NTFS directory junction.
A local, non-elevated user could replace this directory with a junction to an arbitrary path, causing the service to create SYSTEM-owned files in attacker-chosen locations, enabling local privilege escalation under certain conditions.
Affected context
This vulnerability affects Claude Desktop for Windows installations where:
- CoworkVMService runs as a privileged SYSTEM service.
- A VM bundle directory is created or used in a user-writable location.
- The service performs file creation or initialization in that directory without verifying that it is not an NTFS junction or other reparse point.
The issue is limited to local environments where an unprivileged user has write access to the VM bundle directory path and can manipulate its filesystem structure between service operations.
Exploit preconditions
- Attack surface: Local Windows system running Claude Desktop with CoworkVMService installed.
- Required access: A non-elevated local user account with write permissions to the VM bundle directory used by the service.
- Trigger point: The moment CoworkVMService creates or writes files into the VM bundle directory, assuming it is a normal directory.
- Why exploitation is possible:
- The service trusts the VM bundle directory path and does not check for NTFS reparse points or directory junctions.
- An attacker can replace the VM bundle directory with a directory junction pointing to a privileged filesystem location.
- When the service writes files through this path, Windows resolves the junction, leading to SYSTEM-owned files being created in attacker-chosen directories.
Why this happens
The root cause is the absence of robust validation around filesystem paths used by a high-privilege Windows service.
CoworkVMService assumed that the VM bundle directory path always referred to a normal directory, and did not guard against NTFS directory junctions or other reparse points controlled by unprivileged users.
This aligns with CWE-59: Improper Link Resolution Before File Access ('Link Following'), where privileged code follows links (including junctions) in a way that can be redirected by an attacker to sensitive locations.
Because the service operates with SYSTEM privileges, this improper path handling can be chained into CWE-269: Improper Privilege Management, as it effectively lets lower-privileged users influence privileged file operations and escalate their rights.
Potential impact
- Creation of SYSTEM-owned files in arbitrary directories chosen by a local attacker.
- Potential overwrite or placement of executables, configuration files, or scripts that are later executed with elevated privileges.
- Escalation from a standard user account to SYSTEM or other high-privilege contexts, depending on what file locations are targeted.
- Persistence mechanisms that leverage SYSTEM-owned artifacts in sensitive folders.
General mitigation guidance
Effective mitigation centers on hardening how privileged services interact with the filesystem, particularly when user-writable paths are involved.
Recommended patterns include:
- Avoid trusting user-writable directories for privileged operations: Design services so that any path used with elevated privileges resides in directories not writable by untrusted users.
- Validate directory identity before use: When a privileged service needs to use a path influenced by user input or under user-writable locations, explicitly verify:
- That the path refers to a normal directory and not a reparse point or junction.
- That the final resolved path is within an expected, trusted root.
- Use secure file creation APIs and flags: Prefer APIs and flags that reduce symlink/junction abuse where possible, and avoid time-of-check/time-of-use gaps between validation and file creation.
- Enforce least-privilege design: Run components with the minimal privileges required rather than SYSTEM, and separate unprivileged operations from privileged ones.
- Constrain attack surface via ACLs: Tighten filesystem permissions so that unprivileged users cannot alter directories or subpaths that privileged services depend on.
How teams detect issues like this
To detect similar vulnerabilities, organizations can:
- Static analysis and code scanning:
- Identify privileged Windows services that perform file operations on paths derived from user profiles, temp directories, or other user-writable locations.
- Flag uses of directory paths without accompanying checks for reparse points or junctions when running under elevated tokens.
- Look for patterns where a service opens or creates files after a separate directory existence check, which may introduce time-of-check/time-of-use issues.
- Code review practices:
- During security-focused reviews, trace all filesystem paths used by privileged components back to their sources, and ensure they resolve only within trusted directory trees.
- Require explicit documentation and checks for symlink/junction handling on Windows.
- Policy and hardening checks:
- Implement baseline rules that privileged services must not rely on user-writable paths without explicit, documented safety checks.
- Use automated review tools or CI checks to enforce secure path-handling patterns in Windows services.

