CVE-2025-58727 — Windows Connected Devices Platform Service Elevation of Privilege Vulnerability
Executive Summary
Concurrent execution using shared resource with improper synchronization ('race condition') in Windows Connected Devices Platform Service allows an authorized attacker to elevate privileges locally.
Overview
CVSS Vector
CVSS:3.1/AV:L/AC:H/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 21H2 for 32-bit Systems | 5066791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5066791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5066791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5066791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5066791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5066791 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 22H2 for ARM64-based Systems | 5066793 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 22H2 for x64-based Systems | 5066793 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5066793 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5066793 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems | 5066835 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for x64-based Systems | 5066835 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 25H2 for ARM64-based Systems | 5066835 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 25H2 for x64-based Systems | 5066835 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022, 23H2 Edition (Server Core installation) | 5066780 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 | 5066835 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 (Server Core installation) | 5066835 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5066791 |
Security Update | Yes |
5066793 |
Security Update | Yes |
5066835 |
Security Update | Yes |
5066780 |
Security Update | Yes |
Patch Diff
Race condition (CWE-362) in the Windows Connected Devices Platform Service cdpsvc.dll, local elevation of privilege to SYSTEM (Important, AV:L, AC:H race, CVSS 7.0). CDPComDevice issues device queries and receives results asynchronously; DeviceCallback::OnAppTargetListReceived is invoked when a device's app-target list query result (CDPComDeviceResult) arrives and resolves app identities (ComAppIdFromCDPAppId) from that shared result. PRE: the callback processed the shared CDP device-query result without adequate synchronization against concurrent query/teardown, so a racing operation could run alongside it, corrupting or using stale/invalid state; because CDPSvc is a local service, winning the race elevates to SYSTEM. Diff of cdpsvc.dll 10.0.26100.6725 (KB5065789, Sept) -> .6899 (KB5066835, Oct 14 2025, 24H2) confirms the fix: gated behind CFR flags Feature_1319939386 / Feature_Servicing_CDPComDeviceQuery, OnAppTargetListReceived (ratio 0.65) is reworked so the result processing is dispatched through a new gated std::function/lambda (lambda_7ffd2521, whose operator() runs the ComAppIdFromCDPAppId processing under Feature_1319939386) instead of the prior inline _Func_impl handler, so the shared CDP query state is handled on a serialized path rather than raced inline. Stated at confirmed-changed level (a single explicit lock primitive is not cleanly isolable; the race-hardening restructure and the Feature_Servicing_CDPComDeviceQuery gate are clear).
| Function | Address | Change | Note |
|---|---|---|---|
CDPComDevice::DeviceCallback::OnAppTargetListReceived |
code change |
code (async result handling routed through a gated serialized dispatch, CFR-gated) | Pre: built an inline std::_Func_impl_no_alloc<lambda_dde3f900...> and processed the CDPComDeviceResult directly. Post (Feature_1319939386 / Feature_Servicing_CDPComDeviceQuery): constructs a new lambda_7ffd2521 wrapped in std::function and dispatches the result through it, so the shared CDP device-query state is handled on a serialized/gated path. |
lambda_7ffd2521::operator() (added) |
code change |
added (gated result-processing closure) | New closure that resolves app identities (ComAppIdFromCDPAppId) from the query result; its operator() runs under Feature_1319939386. One of 7 added helpers supporting the reworked dispatch. |
Feature_1319939386 / Feature_Servicing_CDPComDeviceQuery |
gate |
added (CFR gates) | CFR flags gating the reworked CDP device-query result handling; the original inline path still ships when disabled. |
Root Cause Analysis
CVE-2025-58727 — Windows Connected Devices Platform Service cdpsvc.dll App-Target Result Race → Elevation of Privilege
Summary
| Product | Windows — cdpsvc.dll (Connected Devices Platform Service / CDPSvc) |
| CVE ID | CVE-2025-58727 |
| Impact | Elevation of Privilege (to SYSTEM) |
| MSRC severity | Important |
| CVSS | 7.0 / 6.1 — CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C |
| CWE | CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization (‘Race Condition’) |
| Delivery | Local — win a race on the CDP device-query result path |
| KB / Fixed build | KB5066835 — cdpsvc.dll 10.0.26100.6899 (Win11 24H2 x64) |
| Patch Date | October 14, 2025 (2025-Oct) |
| Pre-patch binary | cdpsvc.dll 10.0.26100.6725 (KB5065789) — SHA256 878f35b1cafe6a27d6220da0df7f2c150ab7c745a70fbb5f4adbbdc652aa9a4a |
| Post-patch binary | cdpsvc.dll 10.0.26100.6899 (KB5066835) — SHA256 d8ae079b813694f5683addf96a61e015a395ef2c6ec16ff7f91dcc221624069a |
| Feature flag | Feature_1319939386 / Feature_Servicing_CDPComDeviceQuery — the fix is CFR-gated |
| Exploitability | Exploitation Less Likely; not publicly disclosed; not exploited (per MSRC) |
Product Description
cdpsvc.dll implements the Connected Devices Platform Service (CDPSvc), which
brokers cross-device connectivity and app-target discovery. CDPComDevice issues
device queries and receives their results asynchronously; DeviceCallback::OnAppTargetListReceived
is the callback invoked when a device’s app-target list query result
(CDPComDeviceResult) arrives, and it resolves app identities
(ComAppIdFromCDPAppId) from that shared result.
Vulnerability Summary
OnAppTargetListReceived processed the CDP device-query result — shared state produced
by the device-query machinery — without adequate synchronization against concurrent
query/teardown operations. A racing operation on that shared query state could
therefore run alongside the callback (CWE-362), corrupting or using stale/invalid state.
Because CDPSvc is a service reachable by a local user and the race lets an attacker
influence privileged processing, winning the race (AC:H) allows elevation to SYSTEM
(per the MSRC FAQ).
Confirmation level: this October update restructures the result-handling path under
Feature_1319939386/Feature_Servicing_CDPComDeviceQuery(the changed functionOnAppTargetListReceived, ratio 0.65, plus 7 added helpers). The isolable mechanism is that the result processing is moved into a gatedstd::function/lambda dispatch so the shared CDP query state is handled on a serialized path rather than inline; an explicit single lock primitive is not cleanly isolable, so this is stated at confirmed-changed level per the CWE-362 classification and the observed restructure.
Prerequisites and Constraints
- Local, low-privileged (
AV:L,PR:L);AC:H— must win a race between the CDP app-target result callback and a concurrent device-query/teardown operation. - Result: the shared CDP device-query state is accessed concurrently / while stale.
Vulnerability Details
Root Cause
The async app-target result callback accessed shared CDP device-query state without serializing against concurrent query operations, so the state could be raced.
The patch (confirmed — diff, .6725 → .6899)
Gated behind Feature_1319939386 / Feature_Servicing_CDPComDeviceQuery,
OnAppTargetListReceived is reworked so the result processing is dispatched through a
new gated std::function/lambda instead of the prior inline _Func_impl handler:
// CDPComDevice::DeviceCallback::OnAppTargetListReceived (10.0.26100.6899) — PATCHED (from the diff)
// pre: built an inline std::_Func_impl_no_alloc<lambda_dde3f900...> and invoked it directly
// post:
lambda_7ffd2521(local_68, &appId, resultStr, &ctx); // new closure over the query result
puVar1 = std::function<long(CDPComDeviceResult&)>::function(local_50, local_68);
... invoke(puVar1) ... // dispatched via the gated path
// <lambda_7ffd2521>::operator() (added) — gated:
if (Feature_1319939386__private_IsEnabled()) {
appId = ComAppIdFromCDPAppId(result->appId, ...); // result processed on the serialized path
...
}
By routing the app-target result through the Feature_1319939386 /
Feature_Servicing_CDPComDeviceQuery-gated dispatch, the shared CDP device-query state
is handled on a controlled/serialized path rather than raced inline, closing the race
condition.
Patch Completeness Assessment
CFR-gated behind Feature_1319939386 / Feature_Servicing_CDPComDeviceQuery. The
reworked result-handling runs only when the flags are enabled; the original inline path
still ships when disabled. Verify the flags are enabled to confirm the fix is live.
Detection Guidance
Behavioural. Use-after-free / state-corruption crashes in the Connected Devices
Platform Service (cdpsvc!CDPComDevice::DeviceCallback::OnAppTargetListReceived) on
unpatched/flag-disabled builds, correlated with concurrent CDP device-query activity
from local processes.
Config. The fix is CFR-gated — confirm Feature_1319939386 /
Feature_Servicing_CDPComDeviceQuery are enabled.
References
- MSRC advisory — CVE-2025-58727 (Windows Connected Devices Platform Service Elevation of Privilege), released 2025-10-14, KB5066835.
- Full binary diff:
/data/patch_diffs/cdpsvc_dll-cve-2025-58727-ghidriff.md
Attack Path
A race on the CDP device-query result lets a local user elevate to 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.