A configured Windows COM+ CRM application opens and replays a recovery log a standard user created first
Introduction
I conducted this research using an AI research workflow that I designed and built.
I found a flaw in a built-in Windows component: the COM+ runtime inside comsvcs.dll and its recovery-log engine txflog.dll. The bug is one wrong assumption in the code about who wrote a file. A privileged recovery engine reads back a crash-recovery log. It treats that log as something it wrote itself, for two reasons: the log is in a directory where the engine normally creates files, and it carries a valid integrity hash in the engine’s format. Neither reason proves who wrote the file when a lower-privileged user created it first. The engine then reads one field out of that log and uses it as the identifier of a software class to load and run. So a standard user who writes the log chooses which class runs inside the privileged process.
The flaw is not reachable on a default Windows 11 install. On a default install, the only COM+ application with CRM (Compensating Resource Manager) enabled is the COM+ System Application, and a special case in the code sends its recovery log to a directory a standard user cannot write to. The flaw needs a COM+ server application other than the System Application with the CRM feature enabled. In the configuration I proved, that application also runs under a service identity, LocalService, instead of the shipped Interactive User (Part 1 covers the Interactive User case). The application must also have no valid CRMLogFile directory of its own, which is the default. In the proven configuration an administrator changed only two documented catalog properties, CRMEnabled and Identity, on a shipped application, the COM+ QC Dead Letter Queue Listener. Part 7 gives the three results that show the default install is not reachable: the code path, a negative control run, and a pair of runs against the two kinds of application.
The recovery-log behavior alone does not lead to elevation of privilege. The code-execution step also needs a second condition: a missing or dangling COM class registration. On the test build, a sweep of every machine-wide COM class (CLSID) registration found exactly one whose DLL does not exist, at a path where a standard user can create the file: a Cross Device class. Microsoft fixed that registration separately, as CVE-2026-66804, on 2026-08-11, after my tests (Part 5). On a machine with that update and no other such registration, the recovery-log flaw on its own lets a standard user choose which already-installed class the privileged process activates. Microsoft assessed the report as Moderate severity, Defense in Depth, for the same reason (Part 7).
The evidence has two levels: proven on a virtual machine, and read statically. Proven on a virtual machine: (1) a standard user’s pre-created file is opened, truncated, written, and deleted by a different and higher-privileged process; (2) a class identifier the standard user writes into that file reaches a privileged class-activation call and runs that class’s load-time code before any type check; (3) on a target an administrator configured, and with the one phantom class registration described in Part 5, a standard user obtained arbitrary code execution as NT AUTHORITY\LOCAL SERVICE. In that run the standard user’s own activation cold-started the host (started the host process when no instance of it was running). Read statically: a second path from the log to a class activation inside comsvcs.dll, and a possible integer underflow in the record parser of the CRM recovery dispatcher, CRecoveryClerk2::AnalyzeRecord.
Everything was verified on Windows 11, build 10.0.26200.8894 (x64). The two binaries are comsvcs.dll (FileVersion 2001.12.10941.16384, ProductVersion 10.0.26100.8737, SHA-256 2C6931312C6F6EFA10D55171E18AFD973CAA243C1EA1EB65A28211D0477087BF) and txflog.dll (ProductVersion 10.0.26100.1882, SHA-256 874A848CAB037193A6F8047F0A5023A3F45883225306F3EEDC1EA2BFBAFD14B7). The disassembler copies of both DLLs hash identically to the on-disk files in C:\Windows\System32 on the test machine, so every address below is from the build that ran on the test machine. The mechanism comes from static reading of the two binaries. On the live machine, four kinds of evidence confirmed it: Process Monitor file-system traces, the NTFS USN change journal (the volume’s log of file changes), file ownership, and canary DLLs (marker DLLs that only record that they were loaded).
Part 1: The pieces
COM+, serviced applications, and the surrogate host
COM (Component Object Model) is the Windows mechanism for one program to create and call objects implemented by another program. Each kind of object has a 128-bit identifier called a CLSID (class identifier). To create one, code calls CoCreateInstance with the CLSID and gets back a pointer to the object. For an in-process class, COM finds the implementing DLL through a registry key named InprocServer32 under the class, loads that DLL into the calling process, and runs its load-time code before returning the object.
COM+ is a runtime that hosts COM classes and applies administrator-set configuration (identity, security, transactions, CRM) to them. A group of classes configured together is a COM+ application, identified by its own 128-bit AppId (application identifier). A COM+ server application runs inside a shared host process, dllhost.exe, started with a command line like /Processid:{AppId}. That host process is called a surrogate: it is a generic container that loads the application’s DLLs and runs them under the application’s configured identity (the account the host runs as, such as LocalService or a named account). The settings for every application live in a machine database called the COM+ catalog, which an administrator edits through the Component Services tool or the COMAdmin automation objects. Catalog settings relevant here are CRMEnabled, CRMLogFile, Identity, and ApplicationAccessChecksEnabled.
CRM: the Compensating Resource Manager
CRM (Compensating Resource Manager) is a COM+ facility for a form of transaction recovery. The idea is from database systems. An operation first writes a record of what it is about to do into a durable log, and then does the work. If the process stops partway, the log is replayed on restart to finish or undo the work. In COM+, a class called a compensator receives those replayed records. The on-disk log is the CRM recovery log, a file named after the application’s AppId, and the component that replays it on startup is the recovery clerk. CRM is off by default for an application. An administrator turns it on with the CRMEnabled property, which the Component Services tool labels “Enable Compensating Resource Managers” on the application’s Advanced tab.
The recovery engine: comsvcs and txflog
Two DLLs do the recovery work, both loaded into the surrogate. comsvcs.dll is the COM+ runtime itself; it contains the recovery clerk (CRMRecoveryClerk and CRecoveryClerk2). txflog.dll is a general log-file engine in the ARIES recovery-log style (ARIES is a classical database recovery algorithm); comsvcs.dll creates one of its log objects to read and write the on-disk file. The recovery log is opened and replayed when the application’s recovery clerk starts inside the surrogate. In my runs, recovery happened between about 14 seconds and several minutes after the surrogate’s cold start.
Security descriptors, DACLs, and OPEN_EXISTING
Every file carries a security descriptor: the data that records who owns the file and who may do what to it. The who-may-do-what part is the DACL (discretionary access control list), a list of ACEs (access control entries), where each ACE grants or denies specific rights to one account or group. When code creates a file with CreateFileW, it may pass a security descriptor to apply to the new file. When CreateFileW opens a file that already exists, it ignores any descriptor passed to it, because the existing file already has its own security descriptor. The CreateFileW argument that selects between these is the disposition: CREATE_NEW means create a file that must not already exist, and OPEN_EXISTING means open a file that must already exist.
First-writer-wins and the confused deputy
First-writer-wins, also called pre-creation (creating an object before its intended owner does), is the pattern of this bug. A privileged program expects to be the one that creates a file in some directory. It writes the file with a protective security descriptor. Later it opens that file again to use it. A less privileged user may create the file first, before the privileged program runs. Then the privileged program does not create the file. It opens the existing one, and the protective descriptor is never applied, because that descriptor is applied only when the file is created. The privileged program then uses a file whose content and whose permissions were chosen by the attacker. In this post, adoption means that step: the privileged program opens and uses a file that another principal created. This is one case of the broader confused deputy problem. In a confused deputy, a privileged component performs an action for a less privileged caller and uses its own authority to do it. The action then succeeds with rights the caller never had.
The identity that runs the code
In the proven configuration the surrogate runs as NT AUTHORITY\LOCAL SERVICE (S-1-5-19), because an administrator set the application’s identity to LocalService. The shipped identity of that application is Interactive User, under which the surrogate runs as the user logged on to the activating client’s interactive session. A standard user who activates it from their own session gets a host that runs as that same user, so the user gains no rights they did not already have. Under Interactive User the engine also applies no protective descriptor to a log it creates (Part 3 shows where that descriptor is built), and the log still goes to CRMLog. From the code, a log that a standard user plants is then replayed in the host of whichever user starts the application next. If that user is more privileged, the class that the record selects is activated in that user’s host. LOCAL SERVICE holds two privileges that matter for the step to SYSTEM: SeImpersonate and SeAssignPrimaryToken.
Part 2: Where the recovery log comes from
One function computes the log directory: CRMRecoveryClerk::FindLogFilePath at 0x180021eb4. It returns the directory that holds this application’s recovery log. It is called from exactly one place, the recovery driver CRMRecoveryClerk::RecoveryThread at 0x1800210c0, at the call site 0x180021119.
Three tiers, two of them admin-only
FindLogFilePath resolves the directory in three tiers, tried in order:
-
A per-application registry override. It opens
HKLM\SOFTWARE\Microsoft\COM3\CRM\LogFiles(theRegOpenKeyExWis at0x180021f8c) and reads a value keyed by the application’s AppId (0x180021ff1). Only an administrator can write that key. On the test machineHKLM\SOFTWARE\Microsoft\COM3has noCRMsubkey (its subkeys areEventlog,SelfReg, andSetup), andBUILTIN\Usershold only read access to it, so this tier produces nothing. -
The catalog
CRMLogFileproperty. It reads the application’s catalog object (GetComCatalogObjectat0x18002202a), then the application info through a vtable call (an indirect call through the object’s table of method pointers) at0x180022121, then the path through another vtable call at0x180022212. It validates the path at0x180022327with(GetFileAttributesW(...) & 0x1010) == 0x10. That test requires the path to exist, to be a directory, and not to carry the offline attribute. Only an administrator can set this property. -
A fallback. If neither override produced a usable directory, the code falls through to a default.
The default is built by GetDefaultCrmLogPath at 0x18007e55c. Its single call site in the whole module is the call instruction at 0x180022421, inside FindLogFilePath. The decompiled FindLogFilePath listing in the next subsection labels this call with 0x18002242a, the address of the branch that tests the call’s result. GetDefaultCrmLogPath builds a fixed string:
18007e591 __builtin_memcpy(&var_48, u"\Registration\CR", 0x20)
18007e5a3 var_28 = 0x67006f004c004d
18007e5bf GetSystemWindowsDirectoryW(arg2, 0x105)
18007e5d7 StringCchCatW(arg2, 0x105, &var_48)
Lines 1 and 2: the two halves of the literal \Registration\CRMLog. The second assignment is the four wide characters MLog, stored as a little-endian 64-bit value. Lines 3 and 4: prepend the Windows directory, giving %SystemRoot%\Registration\CRMLog. That directory is the one a standard user can write to. Its permissions are measured below.
The AppId special case keeps the default install off the writable path
The fallback is not reached by the one application that has CRM enabled on a default install. FindLogFilePath contains a comparison that matches one specific AppId:
1800222e5 rax_10 = 0x11d1fd8802d4b3f1 - arg2->Data1.q
1800222e9 if (0x11d1fd8802d4b3f1 == arg2->Data1.q)
1800222f2 rax_10 = 0x3592c75f80000d96 - arg2->Data4
1800222ff r12_1.b = rax_10 == 0
18002230b while (true) {
18002230b rax_11 = GetFileAttributesW(&var_248)
180022327 if (rax_11 != 0xffffffff &&
(rax_11 & 0x1010) == 0x10) { rdi = 1; break }
180022349 if (r12_1 == 0) {
1800223be rax_15 = 0x11d1fd8802d4b3f1 - arg2->Data1.q
1800223c1 if (0x11d1fd8802d4b3f1 == arg2->Data1.q)
1800223ca rax_15 = 0x3592c75f80000d96 - arg2->Data4
1800223d1 if (rax_15 == 0) rdi = 1
break
}
18002234b r12_1 = 0
180022367 GetSystemWindowsDirectoryW(&var_248, 0xe8)
180022391 StringCchCatW(&var_248, 0x105, u"\")
1800223a8 StringCchCatW(&var_248, 0x105, u"Registration")
}
180022413 if (rdi == 0)
18002242a if (GetDefaultCrmLogPath(rcx_10.d, &var_248) == 0)
The two constants 0x11d1fd8802d4b3f1 and 0x3592c75f80000d96 are the little-endian encoding of the AppId {02D4B3F1-FD88-11D1-960D-00805FC79235}. That is the COM+ System Application, the one serviced application that ships with CRM enabled, running as LocalSystem inside the service COMSysApp. Lines 1 to 4 set a flag, r12_1, that is true when the caller’s AppId is the System Application. The loop from 0x18002230b runs at most two passes. Lines from 0x18002234b to 0x1800223a8 run only while the flag is set, that is, for the System Application after its catalog path failed the test. They clear the flag and build GetSystemWindowsDirectoryW plus Registration. The result is C:\Windows\Registration, with no CRMLog leaf, and the loop tests that path. On the test machine the catalog check always fails for the System Application. The catalog stores its CRMLogFile unexpanded, as the literal string %systemroot%\Registration. GetFileAttributesW does not expand environment variables, so it treats the string as a path relative to the host’s current directory, C:\Windows\System32, and the test fails. Lines from 0x1800223be to 0x1800223d1 run when a test fails while the flag is clear. They test the AppId again, set the found flag (rdi = 1) only for the System Application, and leave the loop. So the System Application leaves the loop with rdi = 1 even if the rebuilt path also fails, and the test at 0x180022413 skips the GetDefaultCrmLogPath call at 0x180022421. Any other AppId leaves the loop with rdi = 0 and reaches that call.
So the two AppId categories diverge:
- The System Application writes its recovery log to
C:\Windows\Registration. - Any other AppId, if its catalog path was rejected, falls through to
GetDefaultCrmLogPathand writes its log toC:\Windows\Registration\CRMLog.
The two paths differ only in the leaf CRMLog, and only the path with that leaf is writable by a standard user. I confirmed that no other System32 binary carries this path. A byte scan of every DLL and EXE in System32 for the UTF-16 string CRMLog matched only comsvcs.dll, catsrvut.dll, and clbcatq.dll. In catsrvut.dll and clbcatq.dll the match is the catalog property name CRMLogFile, not a path. A scan of the System32 subdirectories also matched four more files of the COM+ catalog family: Com\comadmin.dll, migration\commig.dll, and two copies of commig.dll under migwiz. In all four the match is the same property name.
The permissions, measured
The special case matters only if the two directories have different permissions. I measured both on the machine as the standard user lowpriv1:
C:\Windows\Registration\CRMLog
BUILTIN\Administrators:(OI)(CI)(R,W,D,WDAC,WO,DC)
NT AUTHORITY\SYSTEM:(OI)(CI)(R,W,D,WDAC,WO,DC)
BUILTIN\Users:(R,WD)
BUILTIN\Users:(OI)(IO)(DE,GR,GW)
C:\Windows\Registration
BUILTIN\Administrators:(OI)(F)
Everyone:(OI)(RX)
NT AUTHORITY\SYSTEM:(OI)(F)
Probe results (lowpriv1):
C:\Windows\System32\_crmpoc.tmp DENIED (5)
C:\Windows\Registration\_crmpoc.tmp DENIED (5)
C:\Windows\Registration\CRMLog\_crmpoc.tmp GRANTED (0)
On CRMLog, the BUILTIN\Users:(R,WD) ACE grants the WD right, which is FILE_ADD_FILE: a standard user may create a new file in that directory. The inheritable (OI)(IO)(DE,GR,GW) ACE then grants standard users delete, read, and write on each new file that inherits its permissions from this directory. A log the engine creates for an application that runs under a specified identity, such as LocalService, does not inherit it, because the engine creates that log with a protected DACL (Part 3). On the parent Registration, standard users have only read and execute through the Everyone:(OI)(RX) ACE. The three probe rows confirm the asymmetry directly: the same user is denied creating a file in System32 and in Registration, and is granted creating a file in Registration\CRMLog. Together with the AppId special case above, this means that the one application with CRM enabled by default writes its log in a directory the attacker cannot write, and no default consumer uses CRMLog.
Figure 1. The writable log directory is reachable only for a non-System AppId. The System Application resolves to C:\Windows\Registration, which a standard user cannot write; every other CRM application without a valid CRMLogFile falls through to C:\Windows\Registration\CRMLog, where a standard user may add a file.
Part 3: The adoption bug
Suppose an administrator has enabled CRM on some application whose AppId is not the System Application, so its log directory is C:\Windows\Registration\CRMLog. Now RecoveryThread enumerates that directory for the application’s log files and opens them.
The scan that finds the planted file
In RecoveryThread, after FindLogFilePath returns the directory, the code enumerates it with FindFirstFileW (at 0x1800217e5) and FindNextFileW (at 0x180021a2c) for names matching the application’s log pattern. The file name is gated by length: a compare against 0x2d (45 wide characters) at 0x180021a0a and against 0x54 (84 wide characters) at 0x180021a13. Any other length is skipped with an internal warning at 0x180021a1f. Those are the two legitimate log name forms: {AppId}.crmlog is 45 characters, and {AppId}.{instanceGUID}.crmlog is 84. The scan runs once when the application’s pool size (the number of surrogate processes COM+ may run for the application) is 1, the COM+ default. The selector at 0x180021a70 tests whether the pool size, read through GetAppPoolSize, equals 1. If it does, the selector chooses 0xffffffff (an infinite wait) for the later wait, so the directory is read a single time when the clerk starts. With a larger pool the wait is a periodic interval read from the clerk object at offset 0xc0, and the directory is scanned again on each interval. The consequence for the attacker is a timing requirement: with a pool size of 1, the planted file must exist before the recovery clerk’s single scan. Planting it before the surrogate cold-starts always meets that requirement. The standard user can create the file at any time before the start, and in the proven chain the standard user also causes the start (Part 5).
The engine’s own logs cannot be used in place of a planted file. When the application runs as LocalService, CheckLogFile creates its log with the descriptor from SecurityRequired. On the test machine that log carried a protected DACL that grants access to LOCAL SERVICE only (measured as O:LSG:LSD:P(A;;FA;;;LS)), so the inheritable BUILTIN\Users ACE from Part 2 does not reach it. The System Application runs as LocalSystem, and on the test machine its own log in C:\Windows\Registration measured with no protected DACL: it inherits Everyone:(RX), so a standard user can read and copy it (step 2 of the chain in Part 5). A standard user’s open of the LocalService host’s own instance log in CRMLog for read, for read and write, or for delete was denied. The inheritable ACE does apply to a file created in this directory without an explicit descriptor: on a file an administrator created there, the standard user opened it for read and write and then deleted it. Because the engine’s own log for a LocalService host is closed to the standard user, the attack uses a file the standard user creates first.
CheckLogFile checks no owner or DACL on the open-existing path
The open itself is in CRecoveryClerk2::CheckLogFile at 0x180039138. The bug is in this function:
1800391fa lpSecurityAttributes = nullptr
180039207 if (arg3 != 0)
180039214 lpSecurityAttributes =
CRecoveryClerk2::SecurityRequired(this, arg2)
18003923c rax_4 = CreateFileW(
arg2, 0xc0000000, FILE_SHARE_READ,
lpSecurityAttributes,
(sbb(rdi, rdi, arg3 != 0) & 0xfffffffe) + 3,
FILE_ATTRIBUTE_NORMAL, nullptr)
180039275 rax_6 = GetFileAttributesW(arg2)
180039288 if ((rax_6 & 0x1115) == 0)
goto label_1800392f2
180039465 *arg4 = rsi_1
180039468 return NO_ERROR
The argument arg3 is a flag meaning “a log does not already exist, so create one”. It drives two things at once. First it drives the disposition. The disposition is computed in one expression using the x86 subtract-with-borrow idiom. When arg3 is non-zero, the borrow produces 0xffffffff. That value AND 0xfffffffe is 0xfffffffe, and adding 3 gives 1 (the addition wraps at 32 bits), which is CREATE_NEW. When arg3 is zero the same arithmetic gives 3, which is OPEN_EXISTING. So arg3 non-zero means create a fresh log, and arg3 zero means open the log that the scan already found.
Second, arg3 decides whether a protective security descriptor is built at all. lpSecurityAttributes is set to null at 0x1800391fa. It is reassigned to the output of CRecoveryClerk2::SecurityRequired only inside the if (arg3 != 0) branch at 0x180039214, that is, only on the create path. On the open-existing path, lpSecurityAttributes stays null. The file the attacker pre-created is therefore opened with GENERIC_READ | GENERIC_WRITE, disposition OPEN_EXISTING, and no security descriptor. On this path the code does not check the file’s owner, its existing DACL, or its origin. That missing check is the defect.
The function SecurityRequired at 0x180037cec builds the descriptor that the engine would apply to a log it creates. It has exactly one code reference in the entire module, the call at 0x18003920f, whose result is assigned at 0x180039214. So the open-existing path never reaches the step that builds the descriptor: that step exists only on the create branch. Passing the descriptor on the open path would not help either, because CreateFileW ignores a descriptor when it opens an existing file. A correct open path would have to check the file’s owner and DACL, or re-apply them with SetSecurityInfo.
The attribute mask does not reject a planted file
The GetFileAttributesW test at 0x180039283 (test eax, 0x1115, with its jump at 0x180039288) looks like a check that could reject a planted file. The mask 0x1115 is READONLY | SYSTEM | DIRECTORY | TEMPORARY | OFFLINE. If none of those bits is set, the jump at 0x180039288 skips the reject block (the goto in the listing). If any of them is set, control falls through into the reject block: it closes the handle, sets it to null, and writes a warning. That block does not fail the function. The common tail stores the null handle in the output parameter and still returns NO_ERROR at 0x180039468. A planted file with none of those attributes set does not enter the reject block at all, and a file that enters it still gets NO_ERROR. So the attribute test does not stop the attack.
GetLog closes the handle and re-opens by path
After CheckLogFile succeeds, CRecoveryClerk2::GetLog at 0x1800177c0 loads the log:
1800179c8 result_2 = CheckLogFile(this, rdi, r14, &hObject_2)
1800179d1 if (result_2 == 0)
180017a76 CoCreateInstance(&SimpleFileBasedLog, 0, 0x3,
&IID_ILogInit, &ppv)
180017adc if (hObject != 0) CloseHandle(hObject)
180017b19 QueryInterface(&IID_IPersistFile, &hObject_2)
180017b80 result = (*(*hObject_3 + 0x28))(hObject_3, rdi, 0)
Line at 0x180017a76: GetLog creates the SimpleFileBasedLog object, CLSID {e16c0593-128f-11d1-97e4-00c04fb9618a}, with CLSCTX 0x3 (CLSCTX is the class-context argument that tells COM where the object may run; 0x3 is CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER), and asks for its ILogInit interface ({00951E8C-1294-11D1-97E4-00C04FB9618A}). This CLSID is a fixed value read from the module’s read-only data, so it is not attacker-controlled. Line at 0x180017adc: the handle that CheckLogFile opened is closed and discarded. Lines at 0x180017b19 and 0x180017b80: the code asks the log object for its IPersistFile interface and calls IPersistFile::Load with the path. Load re-opens the file by its path. So the file is opened twice: once in CheckLogFile, closed, and once more by Load from the path string. This adds a check-then-use gap to the adoption: the file that Load opens is identified by its name, and the handle that CheckLogFile opened and tested is no longer used. I tested redirection through that gap on this build, and no redirection worked. A standard user cannot create a subdirectory in CRMLog, so no junction (a directory reparse point that redirects a path to another directory) can be planted there. CreateHardLinkW from CRMLog to five files the standard user cannot write failed with access denied on all five. The reparse tags (the type codes of NTFS reparse points) a standard user may set on a file there make a normal open of that file fail with ERROR_CANT_ACCESS_FILE (1920). So the by-name re-open adds no reachable primitive, and the file the engine writes is always the standard user’s own file in CRMLog.
The error handling here has three branches. If Load returns STG_E_INVALIDHEADER (0x800300fb), the engine re-initializes the existing log. If it returns ERROR_SHARING_VIOLATION (0x80070020), GetLog writes a warning and returns that error, so the log is neither re-initialized nor replayed. A zero-byte file is detected and initialized by path. A planted file whose block hashes fail validation selects the STG_E_INVALIDHEADER branch, and an empty planted file selects the zero-byte branch. A planted file whose hashes validate makes Load return no error, so GetLog takes none of the three branches and goes on to replay the log (Part 4). The sharing-violation branch needs an open handle on the file that conflicts with the re-open in Load. Only the sharing-violation branch carries a debugger trace message that the VTRACE1 registry value turns on. The zero-byte branch and the STG_E_INVALIDHEADER branch trace through a function that is never enabled on this build (Part 8).
The only content control is an unkeyed hash
The log content is protected by one integrity mechanism, in txflog: HASHEDBLOCK::ValidateHash at 0x180009684. Each block starts with a magic value 0x881EF106011CBAB0, carries a block size, and carries an MD5 digest computed over the block body. This is an unkeyed hash. It uses no secret, so anyone who can write the file can recompute it over any content they like. It is a check against accidental corruption, not a check of who authored the content. It also does not cover the file name, so it says nothing about the AppId the name encodes. A standard user forging a log body recomputes this MD5 and the block validates.
The engine therefore opens a file a standard user created, applies no descriptor and no provenance check, re-opens it by name, and validates its content with a hash the same user can recompute.
Part 4: From the adopted log to a privileged activation
Adoption on its own makes the privileged engine trust a file the standard user wrote, and the engine writes only to that file (Part 3). The flaw reaches a class activation because of what the engine does with the log content: it reads a class identifier out of a replayed record and activates it.
The replay reaches a CoCreateInstance driven by the record
When the log is replayed, the txflog engine walks the records. LogRecoveryEngine::AnalysisPhase at 0x1800024a0 routes engine record types 1, 2, and 3 (the low six bits of the flags field at +0x28) to LogRecoveryEngine::HaveClerkAnalyzeRecord at 0x18000c5bc. HaveClerkAnalyzeRecord contains the sink (the call where attacker-controlled data reaches a dangerous operation) that my dynamic tests reached:
18000c601 movups xmm0, [r14]
18000c65c test dword [r14+0x28], 0x100
18000c664 je 0x18000c701
18000c674 xor edx, edx
18000c67b lea r9, [rel 0x18001a490]
18000c682 mov rcx, r14
18000c685 lea r8d, [rdx+0x15]
18000c689 call CoCreateInstance
The register r14 points at the engine header that starts the record’s payload; the on-disk record carries its own 16-byte header before it. The layout here is a 16-byte clerk GUID at offset +0x00, a second GUID at +0x10, a value at +0x20, and a flags field at +0x28. Instruction at 0x18000c601: the 16 bytes at +0x00, the clerk GUID, are loaded; these bytes are whatever the log author wrote. Instruction at 0x18000c65c: the flags field at +0x28 is tested against 0x100 (bit 8). If that bit is clear the branch at 0x18000c664 skips the activation. So bit 0x100 is the activation gate, and the attacker sets it. There is one more condition before this: the clerk GUID must not already be in the engine’s table of registered clerks, which a forged, otherwise-unused GUID satisfies. Instructions at 0x18000c674 to 0x18000c682: xor edx, edx zeroes rdx, the pUnkOuter argument; r9, the interface-id argument, is set to the address 0x18001a490, which holds IID_ILogRecoverClerk; and rcx, the CLSID argument, is set to r14, the record itself. Instruction at 0x18000c685: rdx is 0 here, so the CLSCTX argument is set to 0x15, which is CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER. CLSCTX_INPROC_SERVER is the bit that makes COM load the class’s in-process DLL. Instruction at 0x18000c689: CoCreateInstance is called with the record pointer as the CLSID argument and IID_ILogRecoverClerk ({D485C597-E1EC-11D0-AD03-00C04FC2ADC0}) as the requested interface.
The CLSCTX includes CLSCTX_INPROC_SERVER, so COM resolves the CLSID to its InprocServer32 DLL and loads that DLL into the surrogate. COM then runs the DLL’s load-time entry point and class factory. All of this happens before the interface query runs on the returned object. The only type check in this path is the query for IID_ILogRecoverClerk. It runs on an object that already exists, so it runs after the DLL has loaded and run. A query for the wrong interface fails the record, but it fails it after the selected class’s load-time code has run in the privileged process.
The second path in comsvcs
There is a second path from the log to an activation, in comsvcs.dll, the module that calls txflog.dll. CRMClerk::AnalyzeRecord at 0x180074c70 handles the clerk-begin record (CRM record type 0x20). At 0x180075161 it copies 16 bytes of the record body into the clerk’s compensator CLSID field. CRMClerk::GetCompensator then passes that field to CoCreateInstance at 0x180078850 with CLSCTX 0x17, which includes CLSCTX_INPROC_SERVER. CRMClerk::AnalyzeRecord accepts the record by its type (0x20 to 0x23, the test at 0x180074e96). It checks the record length only with an assertion, and a failed assertion only writes a warning. The copy runs whenever the compensator CLSID field is still null (the test at 0x180075143). A later assertion that compares that field with the record also only writes a warning. The recovery dispatcher CRecoveryClerk2::AnalyzeRecord at 0x18007ed50 is a different function. For CRM record types 2 and 3 it calls CRecoveryClerk2::CreateClerk at 0x18007f780. That function activates the fixed CRM clerk class, CrmClerk {ECABB0BD-7F19-11D2-978E-0000F8757E2A}, and stores the record’s GUID as the clerk’s instance identifier; it does not activate the record’s GUID. CRMRecoveryClerk::CheckCompensator at 0x18007e020 also activates a caller-supplied CLSID before its interface query (CoCreateInstance at 0x18007e0f8). It has no direct code caller, only vtable references. The one call I found is on the runtime write path, not on the replay path. I read the compensator path statically. The path that ran in my dynamic tests is the txflog engine sink above.
The recovery dispatcher CRecoveryClerk2::AnalyzeRecord also contains a possible parser bug, read statically:
18007ee22 if (type == 3)
18007ee4e if (logrec->cbData u<= 0xc)
18007ee88 CError::WriteToLog(
u"logrec->cbData > sizeof(CRMLOG_HEADER)")
18007ee95 rbx_3 = logrec->cbData - 0xc
18007ee9b if (rbx_3 u< 0x10)
18007eeae CError::WriteToLog(
u"ulRecordBodySize >= sizeof(CLSID)")
18007eedf numCLSIDs = rbx_3 u>> 4
18007ef8a do CreateClerk(this - 0xb8,
&rec[3 + sx.q(i) * 4])
18007efd4 while (i u< numCLSIDs)
The record type 3 carries a counted array of CLSIDs. The pointer rec is an array of 32-bit values that starts at the record header, so index 3 is byte offset 0xC, the first CLSID after the 12-byte header. The count is computed as (cbData - 0xC) >> 4. The two checks above it, that cbData is larger than the 0xC-byte header and that the body is at least one 16-byte CLSID, are soft: each one writes a warning and continues, it does not return. Two later checks, that the count is non-zero and that the body size is a multiple of 16, are soft in the same way, so none of the four stops the loop. So a cbData value below 0xC makes the subtraction wrap to a very large unsigned number, and the shift then yields a count of exactly 0x0FFFFFFF, which would drive the CreateClerk loop far past the record body. This is a possible unsigned underflow in a counted-structure parser.
What the activation primitive reaches on its own
The 16 bytes the attacker writes as a record’s clerk GUID become the CLSID of a privileged CoCreateInstance. On its own, this activation does not load an arbitrary DLL of the attacker’s choosing, because the CLSID still resolves through the registry, and the registry view that matters is the privileged process’s own. COM in the privileged process looks the CLSID up in its own HKEY_CLASSES_ROOT. That view merges the machine classes with the classes of its own account, LOCAL SERVICE, and does not include the standard user’s hive. I ran one related test. I registered a marker class only under the standard user’s HKCU, with its DLL in the standard user’s profile, and named it in a forged record with a valid hash. The engine consumed the record, and nothing loaded in the surrogate. That run does not isolate the registry view, because LOCAL SERVICE also has no access to the standard user’s profile directory. So the limit rests on the resolution rule above, and the run only agrees with it. The standard user also cannot change the machine registration. The sweep in Part 5 shows that the standard user cannot create a new key under HKLM\SOFTWARE\Classes\CLSID or HKLM\SOFTWARE\Classes\WOW6432Node\CLSID, and cannot open any existing server key there for write. So, on its own, the activation primitive reaches at most the cross-principal activation of a class that is already registered in the privileged process’s own view: HKLM, plus the per-account classes of LOCAL SERVICE, whose registry hive a standard user cannot open. The attacker selects which already-installed in-process class the privileged process loads and runs. The attacker does not select the code that the class maps to. Arbitrary code needs one more condition: a registered class whose DLL does not exist, at a path where a standard user can create the file. Part 5 covers that condition.
Figure 2. On an application configured as in Part 7, and with the phantom class from Part 5, a standard user uses the recovery log to select code that runs as LOCAL SERVICE. The user writes the log, the recovery engine adopts it with no owner check, and the class id in the record is activated. Without a phantom registration, the same step reaches only classes already registered in the host’s own view: HKLM plus the LOCAL SERVICE account’s classes.
Part 5: Arbitrary code execution through one phantom class
The activation primitive reaches arbitrary code when an already-registered class names an InprocServer32 DLL that does not exist on disk, at a path a standard user can create. Such a class is a phantom: the registry names a DLL, the DLL is absent, and a standard user can create a file at that path. A standard user then supplies both the selector (by naming that CLSID in the forged log) and the code (by writing a DLL to the absent path). Microsoft’s assessment calls this a missing or dangling COM class registration. I searched both machine CLSID roots for phantoms.
The sweep found exactly one phantom
I ran a sweep as the standard user over every CLSID key in both machine roots, HKLM\SOFTWARE\Classes\CLSID and HKLM\SOFTWARE\Classes\WOW6432Node\CLSID. For each InprocServer32, LocalServer32, and InprocHandler32 value, it tested the named image with a real create or open attempt, never by reading an ACL. For an existing image, it opened the file for write and for delete, and tried to create a file in its directory. For an absent image, it found the deepest parent directory in the path that exists and tried to create a file and a subdirectory there. Every probe was non-destructive. The sweep also tried to create a new CLSID key under each root, to open every server key for write, and to create a file in each machine PATH directory. Its output, regrouped by category and wrapped to fit this column (the bare-name lines omit their CLSIDs):
# gapa-sweep principal=lowpriv1 pid=6028
TRIVIAL-DENIED CREATE-CLSID-KEY
SOFTWARE\Classes\CLSID Win32=5
TRIVIAL-DENIED CREATE-CLSID-KEY
SOFTWARE\Classes\WOW6432Node\CLSID Win32=5
PHANTOM {E9F83CF2-E0C0-4CA7-AF01-E90C70BEF496} InprocServer32
C:\ProgramData\CrossDevice\CrossDevice.Streaming.Source.dll
deepest-existing=C:\ProgramData addfile=1 addsubdir=1
BARENAME InprocServer32 combase.dll
BARENAME InprocServer32 coml2.dll
BARENAME InprocServer32 ole32.dll
BARENAME InprocServer32 AppxDeploymentClient.dll
PATHDIR C:\WINDOWS\system32 addfile=0
PATHDIR C:\WINDOWS addfile=0
PATHDIR C:\WINDOWS\System32\Wbem addfile=0
PATHDIR C:\WINDOWS\System32\WindowsPowerShell\v1.0 addfile=0
PATHDIR C:\WINDOWS\System32\OpenSSH addfile=0
# clsid_keys=12369 server_paths=11824 unique_probed=2306
# PHANTOM=1 WRITABLE=0 BARENAME=4 SAFE=2301 REGWRITABLE=0
The two summary lines add up as follows. The sweep enumerated 12369 CLSID keys under the two roots and read 11824 non-empty server values. Many values name the same image, so it classified each distinct name once: 2306 names in total. Four of them are bare file names with no directory (BARENAME). The other 2302 are full paths, and each one is in exactly one category: PHANTOM 1, WRITABLE 0, SAFE 2301. PHANTOM means the image is absent and its deepest existing parent directory accepted a new file or a new subdirectory from the standard user. WRITABLE means the image exists and the standard user could open it for write or for delete, or create a file beside it. SAFE is everything else, including absent images whose nearest existing parent the standard user cannot write. REGWRITABLE 0 means the standard user could not open any InprocServer32, LocalServer32, or InprocHandler32 key to set a value. No CLSID key accepted a new subkey, and both roots refused a new CLSID key with Win32 error 5 (access denied).
A bare name is found through the loader’s DLL search order. The four are combase.dll, coml2.dll, ole32.dll, and AppxDeploymentClient.dll, and all four are present in System32. The surrogate dllhost.exe runs from System32, so the search finds them there before it reaches any PATH directory. The sweep also tried to create a file in each of the five machine PATH directories, and all five refused. So the bare names give a standard user nothing to plant.
That leaves one image path a standard user can supply on the test build: the class {E9F83CF2-E0C0-4CA7-AF01-E90C70BEF496}. Its InprocServer32 value is the REG_EXPAND_SZ string %PROGRAMDATA%\CrossDevice\CrossDevice.Streaming.Source.dll, with ThreadingModel Both. At sweep time neither the file nor the CrossDevice directory existed, and C:\ProgramData let the standard user create both. This matches the limit in Part 4. A standard user can neither register a class nor redirect one. Using the phantom requires neither: the class is already registered in HKLM, and the standard user supplies only the missing DLL.
Why the phantom was present on the test build
In the CVE-2025-24076 write-up, John Ostrowski of Compass Security showed that the “Mobile devices” feature, which lets a linked phone act as a webcam, had two problems. The feature stored CrossDevice.Streaming.Source.dll in the user-modifiable directory C:\ProgramData\CrossDevice. A process running as SYSTEM loaded that DLL with no signature check. Microsoft fixed that issue on 2025-03-11, together with the user-to-user variant CVE-2025-24994. The HKLM registration stayed. Microsoft and Project Zero call a registration in this state dangling: the class is registered for all users, and the DLL it names is missing.
Three later write-ups used this dangling class as their code-delivery step, each through a different privileged selector. In the CVE-2026-21508 write-up, 0xc4r wrote this class id into the per-user Instance key of another class, and WUDFHost.exe, running as LOCAL SERVICE, loaded a DLL planted at the absent path. In the CVE-2026-50343 write-up (“Dark Elevator”), r0keb added a StaticPluginMap entry, and InstallService, running as LocalSystem, loaded the same class. That write-up lists the user-plantable class as its second bug. In the CVE-2026-66804 write-up, James Forshaw of Project Zero, one of the reporters of that CVE, reaches the same class through the unmarshal class of a custom-marshaled object passed to the Shell Create Object Handler, a COM server that runs as SYSTEM. He describes that bug as an incomplete fix for CVE-2026-50343. Microsoft fixed the registration itself as CVE-2026-66804 on 2026-08-11.
The test build is newer than the fixes for CVE-2026-21508 and CVE-2026-50343 and older than the fix for CVE-2026-66804. Build 10.0.26200.8894 is later than the fixed builds for CVE-2026-21508 (10.0.26200.7781 and 10.0.26200.7840) and CVE-2026-50343 (10.0.26200.8875), and earlier than both fixed builds for CVE-2026-66804 (10.0.26200.9106 and 10.0.26200.9168). So the registration was still present and still dangling there. I checked build 10.0.26300.9818 after the CVE-2026-66804 release. The advisory does not list that build; for the 10.0.26200 builds it gives 10.0.26200.9106 and 10.0.26200.9168. On 10.0.26300.9818 the same class names %SystemRoot%\System32\CrossDeviceVirtualCameraSource.dll, a file that exists and carries a valid Microsoft signature. C:\ProgramData\CrossDevice does not exist there. In this chain, this class is the “secondary missing or dangling COM class registration” that, in Microsoft’s assessment, the elevation of privilege requires (Part 7). The recovery-log flaw, in a different component, supplies the selector. This class supplied the code on the test build, and on build 10.0.26300.9818 it no longer does. The CVE-2026-66804 update is a fix in the Cross Device component, not in the recovery-log engine.
The standard user cold-starts the host
The chain still needs the surrogate to start after the file is planted, because with a pool size of 1 the scan runs once. The target I used for the full chain was the COM+ QC Dead Letter Queue Listener, AppId {7B4E1F3C-A702-11D2-A336-00C04F7978E0}, after an administrator changed two of its catalog properties: CRMEnabled from false to true, and Identity from the shipped Interactive User to LocalService. The application ships with ApplicationAccessChecksEnabled set to false, and I did not change it. The application’s only component is its Dead Letter Queue Listener Starter ({ECABAFCA-7F19-11D2-978E-0000F8757E2A}, ProgID QC.DLQListener; a ProgID is the class’s readable name in the registry). Under that setting, the standard user called CoCreateInstance on that component with CLSCTX_LOCAL_SERVER. The call returned success and cold-started a fresh LocalService surrogate. I verified there were zero surrogates immediately before and a fresh process after. So the standard user both plants the file and causes the host to start, with no per-attack administrator action. The two catalog changes alone let a standard user start a LOCAL SERVICE host for the shipped listener class. The class that the host activates is chosen through the recovery log. Recovery then starts asynchronously. In these standard-user runs the payload ran roughly one to five minutes after the activation. The 14 second adoption in Part 6 was measured with an administrator starting the application directly.
What ran
Naming the phantom CLSID in the forged record made the activation in Part 4 load the attacker’s planted DLL and run its load-time code as the host identity. The host identity in this configuration is NT AUTHORITY\LOCAL SERVICE (S-1-5-19), which holds SeImpersonate and SeAssignPrimaryToken. The full chain, run entirely as the standard user, is:
- Pre-create
{AppId}.crmloginC:\Windows\Registration\CRMLog. - Fill it with a copy of the System Application’s own log, which standard users can read in
C:\Windows\Registration. In one record, replace the clerk GUID with the phantom CLSID and set bit0x100in the flags. Then recompute the unkeyed MD5 of that block. The copied log already has a valid file format, so no format authoring is needed. - Create
C:\ProgramData\CrossDeviceand write the payload DLL to the phantom’s absent path in it. - Trigger the cold start with the
CLSCTX_LOCAL_SERVERactivation above.
Part 6: What I proved on the machine
The principal in every dynamic test was the standard user lowpriv1, SID S-1-5-21-702198220-2065934428-4228756745-1005, a member of BUILTIN\Users and not of BUILTIN\Administrators, at Medium integrity, holding only SeShutdown, SeChangeNotify, SeUndock, SeIncreaseWorkingSet, and SeTimeZone. It held neither SeImpersonate nor SeDebug. The proof covers three results: the adoption, which is the input channel, and two primitives built on it. It also covers two tests that show where the flaw is reachable: the paired runs and the negative control.
Adoption, observed in a file-system trace
The first result is the adoption itself: the file a standard user created is opened, truncated, written, and deleted by a higher-privileged principal. I captured it with Process Monitor (crm4.pml) while the configured surrogate recovered. In this run the planted file was zero bytes, which takes the zero-byte branch in Part 3, and an administrator started the application. The relevant lines:
dllhost.exe PID 6244 (NT AUTHORITY\LOCAL SERVICE)
QueryDirectory ...\CRMLog\{7B4E1F3C-...}*.crmlog SUCCESS
CreateFile ...\{7B4E1F3C-...}.crmlog Open
CreateFile ...\{7B4E1F3C-...}.crmlog OpenIf
SetEndOfFileInformationFile EndOfFile: 0
SetEndOfFileInformationFile EndOfFile: 1,048,576
WriteFile Offset: 0 Length: 512
SetDispositionInformationEx FILE_DISPOSITION_DELETE
CreateFile ...\{7B4E1F3C-...}.{B034B70F-...}.crmlog Create
The surrogate, running as LOCAL SERVICE, opened the standard user’s file with disposition Open. That is the OPEN_EXISTING path, and the trace records no “open reparse point” option. It opened the file a second time with disposition OpenIf. This matches the zero-byte branch in Part 3: for a zero-byte file, GetLog skips IPersistFile::Load and passes the path to ILogInit::InitNew, which opens the file again by its name. The surrogate then set the end of file to zero and then to one megabyte, wrote a 512-byte block at offset 0, and deleted the file. After that it created a fresh instance log owned by LOCAL SERVICE. A zero-byte planted file has nothing to truncate. So I also traced non-empty planted files with the NTFS USN change journal, with the same configured host. On a 1 MB planted file whose MD5 was stale, the change journal recorded Data truncation on that file before the host re-initialized the log. On the same file with the MD5 recomputed, it recorded only Data overwrite and then File delete. In every run, a process listing with owners showed that the only process for that application was the LOCAL SERVICE dllhost.exe /Processid:{7B4E1F3C-...}. These writes cross principals, but they reach only the standard user’s own file in CRMLog (Part 3 shows that links and reparse points cannot redirect them). So the adoption is not a write primitive on its own: it is the channel that delivers the standard user’s log content to the privileged engine. The deletion also gives an adoption signal that needs no instrumentation: the planted file disappears when recovery consumes it. The paired runs below use that disappearance as their result.
The paired runs: System Application against a configured application
The same proof-of-concept binary, run by the same standard user against the same directory, took the target AppId as its only argument. With the System Application AppId (COMSysApp restarted by an administrator), the planted file was untouched for the full 60-second window, and the System Application wrote its new log in C:\Windows\Registration. With the configured Dead Letter Queue Listener AppId (the application started by an administrator), the planted file was adopted after about 14 seconds. The two applications also differ in identity, in their CRMLogFile value, and in how they were started. Because of those differences, this pair confirms only the split in Part 2. The static reading in Part 2 attributes the split to the AppId branch.
The negative control: the System Application does not reach the writable path
The negative control is a separate System Application restart, not the one in the paired runs. I planted {02D4B3F1-FD88-11D1-960D-00805FC79235}.crmlog in C:\Windows\Registration\CRMLog and restarted COMSysApp under Process Monitor (an 81 MB trace). The LocalSystem surrogate issued its directory query rooted at C:\Windows\Registration, not at C:\Windows\Registration\CRMLog, and opened C:\Windows\Registration\{02D4B3F1...}.{A2B1F112...}.crmlog. The planted file in CRMLog was never touched: it stayed at zero bytes and was still owned by lowpriv1. No process other than my own tooling touched CRMLog anywhere in the trace. This run shows that on the default install the one CRM consumer writes its log to a different directory and never reaches the writable path.
The activation sink, proven by a six-arm canary
To prove that the bytes in the log reach the privileged CoCreateInstance and run load-time code before the interface check, I used a canary DLL in six test arms (six runs, each with one condition changed). The canary was test instrumentation, not part of the attack. An administrator registered two marker CLSIDs in HKLM, A and B, whose InprocServer32 is a canary DLL. On load, DllMain appends the process id, image, token user, and integrity level to a file, and DllGetClassObject appends the same fields plus the requested CLSID. The directory of that file has a DACL that grants access only to SYSTEM, LOCAL SERVICE, NETWORK SERVICE, and Administrators, so the standard user cannot have written a line there. Every forged log and every planted file was written by lowpriv1. Two arms produced canary lines. Marker A, with bit 0x100 set and the MD5 recomputed, wrote DllMain and DllGetClassObject lines with the token NT AUTHORITY\LOCAL SERVICE at System integrity (0x4000), and the DllGetClassObject line carried the requested CLSID {AAAAAAAA-...}. Marker B, identical except for the 16 CLSID bytes, wrote the same lines with {BBBBBBBB-...}, so the requested class is the one that the attacker’s 16 bytes name. Each of the other four arms removed one condition, and none produced a marker line. In the first, bit 0x100 was cleared. In the second, the MD5 was stale, and the engine re-initialized the log instead. In the third, the record kept the genuine clerk CLSID of the copied record, {ECABB0BE-7F19-11D2-978E-0000F8757E2A} (the CrmRecoveryClerk class). In the fourth, the marker was registered only under the standard user’s HKCU, with its DLL in the standard user’s profile (Part 4 states what this arm does and does not show).
Arbitrary code execution, proven by an on-off-on toggle
The arbitrary-code primitive was proven with the phantom CLSID and an on-off-on structure. The payload ran when the DLL was present at the phantom path. Nothing ran when the DLL was deleted. The payload ran again when the DLL was restored. In this toggle the payload appended its token to a file in C:\PoC\canary2, a directory whose protected DACL grants access only to SYSTEM, LOCAL SERVICE, and Administrators, so BUILTIN\Users has no access. It ran as PID 4052, did not run with the DLL deleted, and ran again as PID 4656. In the toggle runs an administrator started the application, so that the planted DLL was the only variable. In the run with PID 3636, the standard user’s own activation cold-started the host, with zero surrogates running before it. Across the toggle, the cold-start test, and the first validation runs of the single-file proof of concept, I recorded eight separate runs, with process ids 3636, 4052, 4348, 4468, 4656, 4880, 5580, and 1188. In each, the token of the running payload was NT AUTHORITY\LOCAL SERVICE (S-1-5-19) holding SeAssignPrimaryToken and SeImpersonate. The final single-file proof of concept then ran eight more times, between 2026-07-26 16:09:13Z and 17:49:07Z, with the same token. In those runs the payload wrote its token line to C:\Users\Public\crm-phantom-proof.txt and started cmd.exe, which wrote a whoami /all result showing nt authority\local service to C:\Users\Public\result.txt. Standard users can write in C:\Users\Public, so these files do not show which principal ran the code. They show that the proof of concept repeats. The principal that ran the code is shown by the toggle above, whose canary directory grants standard users no access.
The evidence, by result
| Result | What it gives | Evidence |
|---|---|---|
| Adoption | The privileged host opens, rewrites, and deletes a file the standard user created. Its writes reach only that file, so this is the input channel, not a write primitive | Proven on VM (Process Monitor trace, USN change journal); code path read statically |
| Cross-principal activation | The 16-byte clerk GUID in a record becomes the CLSID of a privileged in-process activation; load-time code runs before the interface check | Proven on VM (six-arm canary); limit in Part 4 |
| Arbitrary code execution | Attacker code runs as LOCAL SERVICE on the administrator-configured application, host started by the standard user | Proven on VM via the one phantom class (on-off-on toggle; standard-user cold start in the PID 3636 run); the phantom was fixed later as CVE-2026-66804 |
| Default-install standard-user chain | Nothing | Not reachable: shown by the AppId special case (static) and the negative control (run) |
Part 7: Reachability and severity
Reachability depends on two separate things: the code path that chooses the log directory, and the COM+ configuration of the application.
Three results that show the default install is not reachable
First, statically (Part 2): the System Application’s unexpanded catalog value fails the directory test. FindLogFilePath then special-cases its AppId and builds C:\Windows\Registration. The found flag then skips the GetDefaultCrmLogPath call. The System Application is the only CRM-enabled application on a stock install; the other shipped applications run as Interactive User with CRM off. Second, by the negative control: the System Application restart trace in Part 6 shows the LocalSystem surrogate querying C:\Windows\Registration and leaving the planted file in CRMLog untouched. Third, by the paired runs in Part 6: with the System Application AppId the planted file stays untouched, and with the configured application’s AppId it is adopted. All three results show that the default install does not reach CRMLog.
The special case decides reachability because the two directories have different permissions. The one application with CRM enabled by default writes its log to C:\Windows\Registration, which standard users cannot write. Of the two, standard users can write only to C:\Windows\Registration\CRMLog, and no default consumer uses that directory.
What makes it reachable
The proven state is a COM+ server application other than the System Application that has CRM enabled (CRMEnabled true), runs under a service identity such as LocalService, LocalSystem, or a named account, and has no valid CRMLogFile directory of its own. That routes the application’s recovery log into C:\Windows\Registration\CRMLog, where the adoption in Part 3 and the activation in Part 4 apply. I ran the chain with LocalService; the directory choice in FindLogFilePath and the open path in CheckLogFile do not depend on the identity. On a stock install no such application exists. In my test an administrator changed both settings on a shipped application. An administrator who installs a COM+ application that runs under a service account and enables CRM on it reaches the same state. Both are documented catalog settings, and neither is the default. An Interactive User application with CRM enabled uses the same directory; Part 1 describes its cross-user case.
The trigger in other configurations
I proved that a standard user can cold-start a COM+ surrogate in two configurations. The System Application started from a standard user’s component activation even though it has application access checks enabled, at the component level (AccessChecksLevel 1). That host never reads CRMLog. The configured QC Dead Letter Queue Listener started from the standard user’s own CLSCTX_LOCAL_SERVER activation, because it ships with ApplicationAccessChecksEnabled false. Whether a standard user can start every CRM-enabled non-System application depends on that application’s own access-check and launch-permission configuration. For an application whose launch is restricted, the standard user would need the host to start for another reason.
The boundary and the severity
The proven chain goes from a standard user to LOCAL SERVICE: code chosen by one security principal runs in a process of another principal, a LOCAL SERVICE host that holds SeImpersonate and SeAssignPrimaryToken. The chain has two preconditions that are not part of the recovery-log flaw: the administrator configuration above, and the phantom class from Part 5.
Microsoft’s assessment
Microsoft assessed the report as Moderate severity, Defense in Depth, which is below Microsoft’s threshold for immediate servicing. Its reason is that the recovery-log behavior does not independently lead to elevation of privilege. Reaching that impact requires a secondary missing or dangling COM class registration. The Microsoft Security Response Center (MSRC) shared the report with the responsible engineering team for awareness and internal review.
The assessment agrees with the evidence table in Part 6. On its own, the recovery-log flaw gives one proven primitive inside the privileged host: the activation of a class that is already registered in the host’s own view (HKLM plus the LOCAL SERVICE account’s classes), selected by the standard user. The adoption that carries it writes only to the standard user’s own file in CRMLog. Arbitrary code needs, in addition, a registered class whose DLL does not exist, at a path where a standard user can create the file. On the test build the sweep in Part 5 found exactly one such class. It belongs to a different component, and Microsoft fixed it as CVE-2026-66804 on 2026-08-11, after the test build (Part 5). Without it, the selector reaches only classes that are already installed. The sweep in Part 5 found that a standard user could not create a CLSID key under either machine root, add a subkey to any CLSID key, or set a value on any server key. It also found no existing server image that a standard user could overwrite, delete, or place a file beside.
An administrator who enables CRM on a COM+ application can apply the hardening in Part 8. It has three parts: a CRMLogFile directory, given as an absolute path, that standard users cannot write; ACEs for the application’s own identity in place of the two BUILTIN\Users ACEs on CRMLog; and launch restrictions that stop a standard user from starting the application. Part 8 also gives a sweep for phantom registrations.
Part 8: Prior work and defenses
Related work
This is a first-writer-wins flaw, a form of confused deputy (Part 1): a privileged consumer opens an object that already exists and never applies the protection it would have applied to one it created.
The class selection follows a pattern with published cases on current Windows 11 builds: a privileged process creates a COM class named by data that a lower-privileged user can write or supply. CVE-2026-50343 is “Dark Elevator” (r0keb, published 2026-07-22). In it, the InstallService service runs as LocalSystem and reads a class identifier from the StaticPluginMap entry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\InstallService\State. A standard user can write that entry. The service passes the identifier to CoCreateInstance with CLSCTX_INPROC_SERVER, so the class’s DLL loads into the service. In the CVE-2026-21508 write-up (0xc4r, published 2026-02-11), WUDFHost.exe runs as LOCAL SERVICE and impersonates the user. windows.storage.dll opens the classes root during that impersonation, so it reads a class identifier from the user’s own HKCU\Software\Classes hive, and _SHCoCreateInstance then creates the class the user named. Both write-ups deliver their code through the same phantom class that Part 5 uses, {E9F83CF2-E0C0-4CA7-AF01-E90C70BEF496}. In the CVE-2026-66804 write-up, James Forshaw reaches the same class through a third selector. A standard user passes a custom-marshaled object to the Shell Create Object Handler, a COM server in a SYSTEM dllhost.exe. The object names that class as its unmarshal class, so COM loads the class DLL in that process before the called method runs. MITRE ATT&CK T1546.015, Component Object Model Hijacking, catalogs a related technique: redirecting a class by writing its registration. This flaw changes no registration. It selects which registered class is activated (Part 4).
Older work describes each of the two steps, class selection from data and code delivery through a missing DLL, separately. CVE-2009-2493 is the “ATL COM Initialization Vulnerability”, which MS09-037 fixed in Windows components. In that case, a program reads a data stream, and the stream names the class that OleLoadFromStream creates. The code-delivery step, a privileged service that loads a DLL that does not exist, from a path where a standard user can create the file, also has public cases. In the CDPSvc case that itm4n documented in 2019, the LOCAL SERVICE service loads a missing cdpsgshims.dll from any writable directory in the system PATH. Part 5 gives the history of the Cross Device class itself.
The writable directory and the documented behavior are also public. Stefan Kanthak listed C:\Windows\Registration\CRMLog among the user-writable directories below %SystemRoot% in a Full Disclosure post on 2021-04-29. The same path is in the generic AppLocker bypass list that Oddvar Moe (api0cradle) maintains. Microsoft’s “COM+ CRM Security Considerations” says that when the server application runs under any identity other than Interactive User, the log file is security protected for that user only. The same page says that this protection is applied when the file is first created. “COM+ CRM Startup and Recovery” says four things. First, the log name is based on the AppId. Second, a CRM-enabled application that finds an existing log file for itself performs recovery on it. Third, the application is not started automatically for recovery: some external action, typically creating a component in that application, must start it. Fourth, the log is placed in the directory of the DTC log file (DtcLog). The code on the test build does not place it there: neither comsvcs.dll nor txflog.dll contains the string DtcLog, and the compiled default is C:\Windows\Registration\CRMLog.
This post shows the same class-selection pattern in the COM+ CRM recovery log, with each step read in the code and tested on build 10.0.26200.8894:
- Reachability. The AppId special case in
FindLogFilePathsends the System Application’s log toC:\Windows\Registration, which a standard user cannot write. Every other CRM-enabled AppId without a validCRMLogFilefalls through toC:\Windows\Registration\CRMLog, which a standard user can write (Part 2). - Adoption.
CheckLogFilepasses a security descriptor only on the create branch. A file that a standard user created first is opened as an existing file, with no owner or DACL check. The only content check is an unkeyed MD5 that the same user can recompute (Part 3). - Activation.
HaveClerkAnalyzeRecordpasses the 16-byte clerk GUID of a replayed record toCoCreateInstancewith a CLSCTX that includesCLSCTX_INPROC_SERVER. The DLL loads and its load-time code runs before the query forIID_ILogRecoverClerk(Part 4, and the six-arm canary in Part 6). - Negative control. With the System Application, a planted file in
CRMLogstayed untouched under a Process Monitor trace. With the configured application, the same kind of planted file was adopted (Part 6).
In the two registry cases, the privileged process reads its class identifier from a registry location that a standard user can write. Here the COM+ surrogate reads it from a file that it treats as its own crash-recovery log, on the basis of the file’s directory and an unkeyed hash only.
Detection
The most specific signal is a file created by a non-privileged principal in a privileged replay engine’s work directory, followed by a privileged process opening the same path. Watch for a file-create (Sysmon event id 11, or the kernel file provider) on C:\Windows\Registration\CRMLog\*.crmlog, and on any configured CRMLogFile path, where the writer is not SYSTEM, LOCAL SERVICE, NETWORK SERVICE, or the owning service account. Correlate it with a later open, write, and delete of the same path by dllhost.exe /Processid:{AppId}. A forged log with a valid hash is written and then deleted without a truncate. A planted file with a stale hash is truncated and re-initialized first. A zero-byte planted file is initialized in place.
In the proven chain, the attacker’s own process reads the System Application’s log, creates {AppId}.crmlog in CRMLog, creates C:\ProgramData\CrossDevice and the payload DLL in it, and calls CoCreateInstance with CLSCTX_LOCAL_SERVER on QC.DLQListener. The DLL load and everything the payload does after it happen in dllhost.exe, running as LOCAL SERVICE. So a second signal is a COM+ surrogate raising an image-load (Sysmon event id 7) for a module under a user-writable path during recovery, or activating a CLSID other than the CRM recovery clerk classes.
comsvcs.dll also carries trace messages on two branches of the paths in this post: WARNING: sharing violation in the log open, and WARNING: CoCreateInstance #%d of compensator failed = %08lX on the comsvcs compensator path. They are off by default. Microsoft documents that the CRM warning messages appear in the debugger output when the VTRACE1 value under HKLM\SOFTWARE\Microsoft\COM3\CRM is non-zero, and that key does not exist on the test machine. The zero-byte branch and the existing-log branch also carry warning strings: WARNING: re-initializing zero byte log file and WARNING: re-initializing existing CRM log file. They go through a second trace function, VTrace2, which runs only when the global flag g_fVTRACE2 is set. No code in comsvcs.dll sets that flag, so on this build those two messages are never emitted. The txflog.dll sink that ran in my tests carries no trace message. The two VTRACE1 messages help an investigator who turns tracing on. They are not a default detection source. Microsoft also documents a RecoveryTraceEnabled value under the same key. When it is non-zero, comsvcs.dll writes a recovery trace of CRM activity during recovery to a text file next to the CRM log, named after the log with the extension .recoverytrace.txt (the CreateFileW call is at 0x180031573). On the test machine the CRM key does not exist, so that file is not written by default.
A one-time sweep finds the arbitrary-code condition anywhere on the machine. Enumerate every image named by an HKLM CLSID InprocServer32, LocalServer32, or InprocHandler32 value, in both the 64-bit and the WOW6432Node view. Report each image that does not exist and whose deepest existing parent directory accepts a new file or subdirectory from a standard user. The sweep in Part 5 does this. On the test build it returns one entry, the phantom. On build 10.0.26300.9818, which the CVE-2026-66804 advisory does not list, I checked this one class after the update was released: it names %SystemRoot%\System32\CrossDeviceVirtualCameraSource.dll, a Microsoft-signed DLL, and C:\ProgramData\CrossDevice does not exist. For any other entry, an administrator can create the missing directory with an ACL that does not let standard users add files. That removes the entry.
Hardening
For an administrator who must run a CRM-enabled application, the direct mitigations are these. First, set CRMLogFile to an absolute path, with no environment variables, of a directory that only administrators and the application’s identity can write. FindLogFilePath passes the value to GetFileAttributesW without expanding it, so a value such as %SystemRoot%\CrmLogs fails the check and the log falls back to CRMLog. The System Application’s own value, %systemroot%\Registration, fails this check on the test machine. Second, if the default directory stays in use, replace the BUILTIN\Users:(R,WD) ACE and the inheritable (OI)(IO)(DE,GR,GW) ACE on C:\Windows\Registration\CRMLog with the same rights for the application’s identity only. A LocalService host matches no other ACE in that directory, so removing the two ACEs without a replacement stops CRM from creating its log. Third, restrict who can start the application, and confirm with a test activation as a standard user that the surrogate does not start. Application access checks at the component level are not enough by themselves: the System Application has them enabled (AccessChecksLevel 1), and a standard user still cold-started it by activating one of its components.
For the platform, each fix matches one defect. First, on the open-existing branch of CheckLogFile, verify that the file’s owner is the service identity and that its DACL is the expected one. Refuse the file, or re-apply the descriptor with SetSecurityInfo. A descriptor passed to CreateFileW on that path would be ignored. Second, replace the unkeyed MD5 with a keyed message authentication code, so that only a holder of the key can produce content that validates. Third, check the carried CLSID against an allow-list of the CRM recovery clerk classes before activation, not through the interface query after the DLL has already loaded.
Part 9: Takeaways
The root cause is one assumption in the code: a file in the engine’s log directory that carries a valid block hash was written by the engine itself. If no principal other than the engine could write that directory, the assumption would hold, and this would be at most a robustness issue inside one trust boundary. The default directory is writable by standard users and the hash is unkeyed, so the assumption is false whenever a standard user writes the file first. The field the engine uses to select the class to activate is then written by a standard user.
If you own code that reads back a file your privileged process wrote earlier, two checks show whether your code has this bug. First, can a lower-privileged principal create that file before you do? If so, does your open path verify the file’s owner and DACL, in addition to your create path applying them? A descriptor applied only on create does not protect against an adopted file. Second, does any field of that file select what is loaded, activated, or executed? If so, is that field checked against an allow-list before the load? An interface query after CoCreateInstance cannot block the attack, because the in-process DLL has already loaded and run its load-time code. The recovery engine here makes neither check: it checks no owner on the open path, and it checks the class only after it has loaded it.
On the administrator-configured application, and with the one phantom class that was present on the test build and that the CVE-2026-66804 update fixes, the mechanism is proven to reach arbitrary code execution as LOCAL SERVICE. Without a phantom, the proven primitive is the standard user’s choice of which already-installed class the privileged process activates. The default install is not exposed, because a special case in the code sends the one default consumer’s log to a directory standard users cannot write. The proven exposed configuration is CRM enabled on a non-System COM+ application that runs under a service identity.
References
- CVE-2025-24076: Microsoft Windows Cross Device Service Elevation of Privilege Vulnerability, fixed on 2025-03-11.
- 300 Milliseconds to Admin (CVE-2025-24076 and CVE-2025-24994), Compass Security: the Cross Device DLL in
C:\ProgramData\CrossDeviceloaded by aSYSTEMprocess, and the registration of the class used in Part 5. - Compass Security advisory CSNC-2025-007: the CVE-2025-24076 advisory, with the affected builds and the timeline.
- CVE-2026-21508: Windows Storage Elevation of Privilege Vulnerability.
- CVE-2026-21508: Windows Local Privilege Escalation via arbitrary COM object initialization, 0xc4r:
WUDFHost.exeasLOCAL SERVICEcreates a class named in the user’s own registry hive, with the same Cross Device class delivering the code. - CVE-2026-50343: Microsoft Install Service Elevation of Privilege Vulnerability.
- Dark Elevator: Windows Install Service Local Privilege Escalation (CVE-2026-50343), r0keb:
InstallServiceasLocalSystemcreates a class named in a registry location a standard user can write, with the same Cross Device class delivering the code. - CVE-2026-66804: Microsoft Windows Cross Device Service Elevation of Privilege Vulnerability, the fix for the dangling Cross Device registration, released on 2026-08-11.
- Windows Exploitation Techniques: Dangling COM Object Registrations, James Forshaw: the dangling Cross Device registration, described as an incomplete fix for CVE-2026-50343.
- MITRE ATT&CK T1546.015, Component Object Model Hijacking: the catalogued technique of redirecting a COM class reference.
- CVE-2009-2493, ATL COM Initialization Vulnerability: unsafe use of
OleLoadFromStreamlets a data stream name the object that is created. - Microsoft Security Bulletin MS09-037: the update for Windows components built with the affected ATL headers, including CVE-2009-2493.
- CDPSvc DLL Hijacking: From LOCAL SERVICE to SYSTEM, itm4n: a
LOCAL SERVICEservice loads a missing DLL from a writable directory in the systemPATH. - Stefan Kanthak, Full Disclosure, 2021-04-29: lists
C:\Windows\Registration\CRMLogamong the user-writable directories below%SystemRoot%. - UltimateAppLockerByPassList, generic AppLocker bypasses, api0cradle: lists
C:\Windows\Registration\CRMLogamong the folders a normal user can write by default. - COM+ CRM Security Considerations: under any identity other than Interactive User, the log is security protected for that user when it is first created.
- COM+ CRM Startup and Recovery: the AppId-based log name, recovery of an existing log file when the application starts, and that the application is not started automatically for recovery.
- COM+ CRM Registry Settings: the
VTRACE1value that turns on the CRM debug trace messages, and theRecoveryTraceEnabledvalue that turns on the.recoverytrace.txtrecovery trace file. - COM+ Compensating Resource Manager: Microsoft’s overview of CRM, whose recovery engine this post analyzes.
- CreateFileW function:
CreateFileignores the security descriptor when it opens an existing file.