CVE-2025-59511 — Windows WLAN Service Elevation of Privilege Vulnerability
Executive Summary
External control of file name or path in Windows WLAN Service allows an authorized attacker to elevate privileges locally.
Overview
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows 10 Version 1809 for 32-bit Systems | 5068791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for x64-based Systems | 5068791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for 32-bit Systems | 5068781 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5068781 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5068781 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5068781 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5068781 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5068781 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5068865 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5068865 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems 5068861 (Security Update) 5068966 (Security Hotpatch Update) Important Elevation of Privilege 5066835 Base: 7.8 Temporal: 6.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.26100.7171 10.0.26100.7092 Yes None Windows 11 Version 24H2 for x64-based Systems 5068861 (Security Update) 5068966 (Security Hotpatch Update) Important Elevation of Privilege 5066835 Base: 7.8 Temporal: 6.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.26100.7171 10.0.26100.7092 Yes None Windows 11 Version 25H2 for ARM64-based Systems 5068861 (Security Update) 5068966 (Security Hotpatch Update) Important Elevation of Privilege 5066835 Base: 7.8 Temporal: 6.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.26200.7171 10.0.26200.7092 Yes None Windows 11 Version 25H2 for x64-based Systems 5068861 (Security Update) 5068966 (Security Hotpatch Update) Important Elevation of Privilege 5066835 Base: 7.8 Temporal: 6.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.26200.7171 10.0.26200.7092 Yes None Windows Server 2019 | 5068791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 (Server Core installation) | 5068791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022 5068787 (Security Update) 5068840 (Security Hotpatch Update) Important Elevation of Privilege 5066782 Base: 7.8 Temporal: 6.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.20348.4405 10.0.20348.4346 Yes None Windows Server 2022 (Server Core installation) 5068787 (Security Update) 5068840 (Security Hotpatch Update) Important Elevation of Privilege 5066782 Base: 7.8 Temporal: 6.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.20348.4405 10.0.20348.4346 Yes None Windows Server 2022, 23H2 Edition (Server Core installation) | 5068779 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5068791 |
Security Update | Yes |
5068781 |
Security Update | Yes |
5068865 |
Security Update | Yes |
5068779 |
Security Update | Yes |
Patch Diff
Registry-symlink local EoP (CWE-59 / external control of path) in the WLAN AutoConfig service wlansvc.dll (runs as SYSTEM). The profile-sync trigger functions CdsTriggerSyncIfNeededForLoggedInUsers, CdsTriggerSyncWithProfileDeletion and CdsTriggerSyncIfProfileEligible query the session user's token via UMgrQueryUserToken and then call Windows::Internal::WiFiCloudStore::IsSyncNeededForUser with that token WITHOUT impersonating it - so the registry work runs under SYSTEM. Inside IsSyncNeededForUser, keys are opened by name under HKLM\SOFTWARE\Microsoft\WlanSvc\ProfileSync\<SID> (OpenGenericSyncBaseKeyForUser 'Profiles'/'Cost', gated by WlanSvcTaskBootstrapped==1, creating an NLM/Irrelevant subkey). A standard user owns that subtree, so they replace the Profiles/Cost/NLM path components with registry symbolic links into protected system hives; SYSTEM then follows them, directing privileged registry operations at attacker-chosen targets -> EoP. IN-HOUSE Ghidra decompilation diff of wlansvc.dll 10.0.26100.7019 -> .7171 (Nov 11 2025; 3 MB analyzed via a persisted project) confirms the fix: all three CdsTriggerSync* functions now DuplicateToken the user token and wil::impersonate_token_nothrow it before the operation and RevertImpersonateToken after (PRE 0 -> POST 22 impersonation calls), so registry access is evaluated with the user's rights and symlinks into system paths fail with access-denied; token/impersonation failure halts the operation. Unconditional fix. Credit: t0zhang.
| Function | Address | Change | Note |
|---|---|---|---|
CdsTriggerSyncIfNeededForLoggedInUsers |
code change |
code (impersonation added before IsSyncNeededForUser) | Pre: UMgrQueryUserToken -> IsSyncNeededForUser(hObject) with no impersonation (SYSTEM). Post: DuplicateToken(hObject, SecurityImpersonation) + wil::impersonate_token_nothrow before IsSyncNeededForUser, RevertImpersonateToken after; halts if token/impersonation fails. Confirmed by our decompilation (impersonation calls PRE 0 -> POST 22 across the CdsTriggerSync* set). |
CdsTriggerSyncWithProfileDeletion |
code change |
code (same impersonation fix) | Shares the same logic; patched to impersonate the user token before the WiFiCloudStore sync operations. |
CdsTriggerSyncIfProfileEligible |
code change |
code (same impersonation fix) | Shares the same logic; patched to impersonate the user token before the WiFiCloudStore sync operations. |
Windows::Internal::WiFiCloudStore::IsSyncNeededForUser |
sink (unchanged) |
vulnerable sink | Opens per-user ProfileSync keys by name (OpenGenericSyncBaseKeyForUser 'Profiles'/'Cost'); pre-patch it ran under SYSTEM so attacker registry symlinks were followed. The fix is upstream (impersonate before calling it). |
Root Cause Analysis
CVE-2025-59511 — WLAN AutoConfig wlansvc.dll Registry-Symlink EoP: User Data Handled Under SYSTEM Without Impersonation in CdsTriggerSync*
Summary
| Product | Windows — wlansvc.dll (WLAN AutoConfig service, runs as SYSTEM) |
| CVE ID | CVE-2025-59511 |
| Impact | Elevation of Privilege |
| CWE | CWE-59: Improper Link Resolution Before File Operation / External Control of File Name or Path |
| CVSS | 7.8 — CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Patch Date | November 11, 2025 |
| Pre-patch binary | wlansvc.dll 10.0.26100.7019 (Oct 28 2025) — SHA256 187597802e4e45fba6df36cad00bb420bcea66842eda9dd45c79c67db25df48b |
| Post-patch binary | wlansvc.dll 10.0.26100.7171 (Nov 11 2025) — SHA256 f8ccb40338fe7bdbee24c5b1d62dd54523efec79922822c28c736c7a6660d874 |
| Fix gating | None — impersonation added directly |
Product Description
The WLAN AutoConfig service (wlansvc) configures, discovers and connects
Wi-Fi networks and runs as NT AUTHORITY\SYSTEM. It maintains per-user Wi-Fi
profile-sync state under
HKLM\SOFTWARE\Microsoft\WlanSvc\ProfileSync\<Current User SID>.
Vulnerability Summary
The profile-sync trigger functions (CdsTriggerSync*) retrieve the session
user’s token via UMgrQueryUserToken, then call
Windows::Internal::WiFiCloudStore::IsSyncNeededForUser with that token but
without impersonating it — so the registry work runs under SYSTEM:
// CdsTriggerSyncIfNeededForLoggedInUsers (10.0.26100.7019) — PRE-PATCH, from our decompilation
v11 = UMgrQueryUserToken(*(v16 + 16*v10), &hObject); // session user's token
...
IsSyncNeededForUser = WiFiCloudStore::IsSyncNeededForUser(hObject, &v21, v12); // *** runs as SYSTEM, no impersonation ***
Inside IsSyncNeededForUser, keys are opened by name under the per-user
ProfileSync tree — OpenGenericSyncBaseKeyForUser(&hKey, L"Profiles") and
...L"Cost", and the WlanSvcTaskBootstrapped DWORD is read to decide whether to
proceed. Because a standard user has write access under
ProfileSync\<SID>, they can replace the Profiles / Cost / NLM path
components with registry symbolic links pointing into sensitive system hives.
The SYSTEM service then opens/creates/reads those targets with SYSTEM
authority, letting the attacker direct privileged registry operations at
protected locations (CWE-59 / external control of path).
Prerequisites and Constraints
- Local, low-privileged (
PR:L). - The user sets
WlanSvcTaskBootstrapped = 1underHKLM\SOFTWARE\Microsoft\WlanSvc\ProfileSync\<SID>(they own that subtree), then plants registry symlinks for theProfiles/Cost/NLMpath segments pointing at a protected hive. - Triggering a profile sync (service restart / natural trigger) makes SYSTEM follow the symlink and act on the target — EoP.
Vulnerability Details
Call Chain
Local user (owns HKLM\...\WlanSvc\ProfileSync\<SID>):
sets WlanSvcTaskBootstrapped=1 and plants registry symlinks (Profiles/Cost/NLM)
↓ (service trigger; SYSTEM)
wlansvc!CdsTriggerSyncIfNeededForLoggedInUsers (also …WithProfileDeletion / …IfProfileEligible)
UMgrQueryUserToken(session user) -> hObject
WiFiCloudStore::IsSyncNeededForUser(hObject) // *** no impersonation -> SYSTEM ***
OpenGenericSyncBaseKeyForUser("Profiles"/"Cost") // opens attacker-symlinked keys as SYSTEM
Root Cause
The service holds the user’s token but performs the registry work in its own SYSTEM security context (no impersonation). User-controlled registry path components are therefore resolved with SYSTEM authority, so attacker-planted symbolic links redirect privileged operations (CWE-59).
The patch (confirmed — decompilation diff, .7019 → .7171)
The three CdsTriggerSync* functions are changed to switch the thread’s
security context to the target user before the operation: they DuplicateToken
the queried user token and wil::impersonate_token_nothrow it, perform the
IsSyncNeededForUser work impersonated, then RevertImpersonateToken; if
token acquisition/impersonation fails, the operation is halted:
// CdsTriggerSyncIfNeededForLoggedInUsers (10.0.26100.7171) — PATCHED, from our decompilation
if (!DuplicateToken(hObject, SecurityImpersonation, &DuplicateTokenHandle)) { ...fail-safe halt... }
v16 = wil::impersonate_token_nothrow(DuplicateTokenHandle, &v27); // *** impersonate the user ***
if (v16 < 0) { ...halt... }
v21 = WiFiCloudStore::IsSyncNeededForUser(hObject, &v34, v17); // now runs as the user
...
wil::details::RevertImpersonateToken(v27, ...); // revert
Under impersonation, registry access is evaluated with the user’s rights, so a symlink into a system hive fails with access-denied instead of being honoured — closing the redirection. Our decompilation shows PRE = 0 and POST = 22 impersonation-related calls across these functions. Unconditional fix (no feature flag).
Detection Guidance
Behavioural. Standard users writing WlanSvcTaskBootstrapped=1 and creating
registry symbolic links for the Profiles / Cost / NLM segments under
HKLM\SOFTWARE\Microsoft\WlanSvc\ProfileSync\<SID>, followed by SYSTEM
(wlansvc) registry operations against protected hives.
Registry. Auditing on the WlanSvc\ProfileSync subtree for
REG_OPTION_CREATE_LINK and for cross-hive redirection during Wi-Fi profile sync.
References
- MSRC advisory — CVE-2025-59511
- Full decompilation diff:
/data/patch_diffs/wlansvc_dll-cve-2025-59511-ghidriff.md - Related registry-symlink / missing-impersonation EoPs: CVE-2025-59512, CVE-2025-59514, CVE-2022-30225
Attack Path
WLAN AutoConfig handles the user's profile-sync registry keys under SYSTEM without impersonation, so user-planted symlinks are followed as SYSTEM
Derived from the patch delta: the checks added by the vendor identify which fields crossed a trust boundary unvalidated. Reachability and privilege are taken from the call chain in the RCA report.