Microsoft shipped Windows Subsystem for Linux (WSL) version 2.7.10 on June 26, 2026, a security update that neutralizes a dangerous privilege-escalation vulnerability in the handling of virtual hard disk restoration. The flaw, rooted in a time-of-check-to-time-of-use (TOCTOU) race condition, allowed attackers to hijack SYSTEM token impersonation through path re-resolution tricks, potentially granting full system control. This release is a narrow but essential servicing update for WSL users on Windows 10 and Windows 11, with no new features beyond the security hardening.

What is WSL 2.7.10?

WSL 2.7.10 is a minor version bump that arrives as part of Microsoft's regular servicing cadence for the Windows Subsystem for Linux. Unlike feature-rich releases that introduce kernel upgrades or new distributions, this update focuses exclusively on closing a security gap in the WSL service core. It was delivered through the Microsoft Store and the standard Windows Update pipeline, ensuring that both consumer and enterprise machines receive the fix promptly.

The update does not alter the WSL kernel version, nor does it change user-facing behavior. Instead, it modifies the internal logic of how WSL restores virtual hard disk (VHD) files that back each Linux distribution. For most users, the update will be invisible, but for security-conscious IT administrators and developers running sensitive workloads inside WSL, it is a critical patch.

The Vulnerability: SYSTEM Path Re-Resolution

At the heart of the fix is a classic TOCTOU vulnerability in WSL's VHD restore routine. When WSL performs a restore operation—for example, when resetting a distribution to a clean state or recovering from a snapshot—it temporarily impersonates a SYSTEM security token to gain the necessary privileges for mounting and manipulating VHD files. This impersonation involves resolving a file system path, checking its validity, and then acting on it.

The flaw lay in the gap between the time the path was validated and the time it was actually used. An attacker capable of influencing the file system state during that window could redirect the operation to an unintended target. By crafting a symlink or junction point that changed between the check and the use, a malicious process could trick the WSL service into restoring a VHD to an attacker-controlled location—or worse, force it to operate on a crafted VHD designed to execute code in the SYSTEM context.

How the Attack Works

Exploiting this TOCTOU race requires local access to the machine and the ability to create symlinks in directories where the WSL service temporarily stages VHD files. The attack unfolds in three stages:

  1. Time-of-check: The WSL VHD restore process, running as SYSTEM, checks a path to ensure it points to a legitimate VHD or folder. The path is valid at this moment.
  2. Time-of-use: Before the service actually uses the path—say, to attach or copy the VHD—an attacker replaces the path with a symlink pointing to a malicious location. This could be a new VHD containing system binaries altered to grant backdoor access.
  3. Token compromise: Because the service continues operating with the SYSTEM token, the malicious VHD is processed with full system privileges. The attacker can then leverage this to overwrite critical system files, create rogue administrator accounts, or disable security mechanisms.

The vulnerability is particularly dangerous because it bypasses user account control (UAC) and other privilege boundaries. WSL services are trusted components, and a successful exploit effectively gives an attacker SYSTEM-level code execution without triggering antivirus alerts.

The Fix: Hardening VHD Restore

WSL 2.7.10 introduces multiple layers of defense to eliminate the race window:

  • Atomic path resolution: The restore function now uses native NT API calls that atomically open a file handle before any validation occurs. Once a handle is obtained, the OS guarantees that the underlying object cannot be swapped out, preventing symlink races.
  • Impersonation boundary tightening: The code now impersonates the caller’s token rather than a hard-coded SYSTEM token for most operations, reducing the blast radius if a path diversion succeeds.
  • Strict canonicalization: Before any restore action, the service resolves the full final path and compares it against a whitelist of acceptable locations. Any deviation causes an immediate abort.
  • Sealed restore environment: The temporary working directory is created with restrictive ACLs that prevent non-SYSTEM processes from creating symlinks or junctions inside it.

These changes collectively make the TOCTOU window infeasible to exploit. Microsoft’s security advisory credited researchers who responsibly disclosed the issue, though specifics about the finders and timelines have not been publicly detailed as of this writing.

Implications for WSL Users and Developers

For the typical WSL user running Ubuntu, Debian, or other distributions on a single-user machine, the risk of exploitation was always low because local access is required. However, in shared environments—such as Azure Virtual Desktop, Windows 365 Cloud PCs, or dev/test labs—a malicious insider or compromised account could have used this flaw to escalate from a limited user to SYSTEM.

Security engineers and DevOps practitioners should note that the vulnerability highlights the complexity of mixing Windows and Linux security models. WSL bridges two kernel architectures, and its privileged services must handle paths originating from both Windows and Linux sides. This update is a reminder that even “legacy-free” components like WSL2 can inherit old-school Windows path-resolution pitfalls.

Microsoft has not indicated that the issue is actively exploited, but the very public nature of a Windows servicing update means attackers now have a clear diff to study. Thus, delaying the update is strongly discouraged.

Microsoft’s Broader Security Push

WSL 2.7.10 aligns with Microsoft’s heightened emphasis on securing its development platform. In recent years, the company has hardened WSL against various symlink attacks, filesystem interop bugs, and network vector escapes. This update follows a 2025 initiative that introduced mandatory virtualization-based security for WSL2 on capable hardware, and it dovetails with the general move toward making Windows a zero-trust-friendly OS.

Additionally, the fix comes at a time when Linux-based development on Windows has become mainstream. Visual Studio Code’s remote development extensions, Docker Desktop’s WSL backend, and GitHub Codespaces all rely on WSL’s integrity. A compromise in the WSL layer could ripple outward to these tools, making the hardening even more critical.

How to Get WSL 2.7.10

The update is available through:

  • Microsoft Store: Search for “Windows Subsystem for Linux” and click update.
  • Windows Update: For Windows 11 devices enrolled in the WSL pre-release ring, the update will appear as an optional driver or component update.
  • Manual download: The .msixbundle can be grabbed from the official WSL GitHub releases page and installed via PowerShell.

To verify you’re on the correct version, run wsl --version in a command prompt; the output should show “WSL version: 2.7.10.0”.

Recommendations

  • Immediate update: Apply the update across all development and production Windows machines that have WSL enabled. The risk may be low for single-user desktops, but the cost of mitigation is negligible.
  • Audit WSL usage: Organizations should inventory where WSL is installed and enforce version compliance via endpoint management tools like Microsoft Intune.
  • Review file system permissions: Ensure that non-administrative users cannot write to directories where WSL stores VHDs (default: %LOCALAPPDATA%\Packages\...).
  • Monitor for suspicious symlinks: Use forensic tools like Sysinternals Streams or Junction to scan for unexpected symlink creation in WSL-related paths.
  • Subscribe to advisories: Stay tuned to the Microsoft Security Response Center (MSRC) for post-release details and any further mitigations.

The Bottom Line

WSL 2.7.10 is not a glamorous update, but it exemplifies the kind of silent, behind-the-scenes security work that keeps the modern development ecosystem trustworthy. By closing a TOCTOU vulnerability in VHD restoration, Microsoft has cut off a subtle yet potent attack vector that could have turned a local low-privilege user into a full system owner. For anyone running WSL in a shared or sensitive context, this update is non-negotiable. Apply it, verify it, and keep coding securely.