CVE-2026-21253 — Mailslot File System Elevation of Privilege Vulnerability
Executive Summary
Use after free in Mailslot File System 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 1607 for 32-bit Systems | 5075999 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1607 for x64-based Systems | 5075999 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for 32-bit Systems | 5075904 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for x64-based Systems | 5075904 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for 32-bit Systems | 5075912 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5075912 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5075912 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5075912 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5075912 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5075912 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5075941 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5075941 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems 5077181 (Security Update) 5077212 (Security Hotpatch Update) Important Elevation of Privilege 5073379 Base: 7.0 Temporal: 6.1 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 10.0.26100.7840 10.0.26100.7781 Yes None Windows 11 Version 24H2 for x64-based Systems 5077212 (Security Hotpatch Update) 5077181 (Security Update) Important Elevation of Privilege 5074109 Base: 7.0 Temporal: 6.1 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 10.0.26100.7781 10.0.26100.7840 Yes None Windows 11 Version 25H2 for ARM64-based Systems 5077181 (Security Update) 5077212 (Security Hotpatch Update) Important Elevation of Privilege 5074109 Base: 7.0 Temporal: 6.1 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 10.0.26200.7840 10.0.26200.7781 Yes None Windows 11 Version 25H2 for x64-based Systems 5077181 (Security Update) 5077212 (Security Hotpatch Update) Important Elevation of Privilege 5074109 Base: 7.0 Temporal: 6.1 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 10.0.26200.7840 10.0.26200.7781 Yes None Windows 11 Version 26H1 for ARM64-based Systems | 5077179 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 version 26H1 for x64-based Systems | 5077179 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 | 5075971 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 (Server Core installation) | 5075971 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 R2 | 5075970 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 R2 (Server Core installation) | 5075970 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2016 | 5075999 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2016 (Server Core installation) | 5075999 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 | 5075904 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 (Server Core installation) | 5075904 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022 5075906 (Security Update) 5075943 (Security Hotpatch Update) Important Elevation of Privilege 5073457 Base: 7.0 Temporal: 6.1 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 10.0.20348.4773 10.0.20348.4711 Yes None Windows Server 2022 (Server Core installation) 5075906 (Security Update) 5075943 (Security Hotpatch Update) Important Elevation of Privilege 5073457 Base: 7.0 Temporal: 6.1 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 10.0.20348.4773 10.0.20348.4711 Yes None Windows Server 2022, 23H2 Edition (Server Core installation) | 5075897 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5075999 |
Security Update | Yes |
5075904 |
Security Update | Yes |
5075912 |
Security Update | Yes |
5075941 |
Security Update | Yes |
5077179 |
Security Update | Yes |
5075971 |
Monthly Rollup | Yes |
5075970 |
Monthly Rollup | Yes |
5075897 |
Security Update | Yes |
Patch Diff
Cancel-routine race use-after-free (CWE-416) in the Windows Mailslot file-system driver msfs.sys MsAddDataQueueEntry. On the blocking (a2==0) path, pre-patch the IRP was linked into the mailslot data-queue list FIRST and only then had its cancel routine installed via MsSetCancelRoutine. If another thread calls CancelIo in that gap, the cancel routine is still NULL so the I/O manager only sets the IRP Cancel flag; the code never re-checked the flag, so the cancellation is lost and the IRP stays permanently queued. When the mailslot FCB/CCB are later freed, the still-queued IRP references freed memory -> UAF. Diff of msfs.sys 10.0.26100.4202 -> .7824 confirms the fix: gated behind CFR flag Feature_1829438777, MsAddDataQueueEntry now atomically installs the cancel routine (*(irp+0x68)=MsCancelDataQueueIrp via _InterlockedExchange64), immediately checks the Cancel flag, and if already cancelled removes the IRP with MsRemoveDataQueueIrp and completes it with STATUS_CANCELLED. The Feb KB5077181 (.7840) ships it enabled. Note: our diff shows Feature_1829438777, differing from the circulated screenshots' Feature_2097874233 (build/arch difference); the set-then-recheck cancel protocol is identical.
| Function | Address | Change | Note |
|---|---|---|---|
MsAddDataQueueEntry |
code change |
code (set-then-recheck cancel protocol, CFR-gated) | Pre (a2==0): enqueue IRP, then MsSetCancelRoutine - cancel arriving in the gap is lost (routine NULL, only Cancel flag set), IRP stays queued -> UAF when FCB/CCB freed. Post (Feature_1829438777 enabled): _InterlockedExchange64 install MsCancelDataQueueIrp; if Cancel flag set and exchange back to 0 succeeds -> MsRemoveDataQueueIrp + STATUS_CANCELLED. |
Feature_1829438777 |
gate |
added (CFR gate) | CFR flag gating the atomic cancel-routine-set + Cancel-flag recheck; original racy path (MsSetCancelRoutine_Unpatched) still ships when disabled. |
Root Cause Analysis
CVE-2026-21253 — Windows Mailslot File System msfs.sys Cancel-Routine Race in MsAddDataQueueEntry → Use-After-Free
Summary
| Product | Windows — msfs.sys (Mailslot File System driver) |
| CVE ID | CVE-2026-21253 |
| Impact | Elevation of Privilege |
| 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-416: Use After Free (cancel-routine race) |
| Delivery | Local race — CancelIo between IRP-enqueue and cancel-routine install |
| KB / Fixed build | KB5077181 — msfs.sys 10.0.26100.7840 (Win11 24H2 x64) |
| Patch Date | February 10, 2026 (2026-Feb) |
| Pre-patch binary (no fix) | msfs.sys 10.0.26100.4202 — SHA256 c1be2b6c4e126baa3a060cadd925309e8665739c5bff4df88e13ff805466bb8e |
| Post-patch binary (fix present) | msfs.sys 10.0.26100.7824 — SHA256 c3212720c70241ce1d9aa9fbceba2820ebefa368bea6b36101a7b24768bb33d0 |
| Feature flag | Feature_1829438777 — the fix is CFR-gated |
| Exploitability | Exploitation Less Likely; not publicly disclosed; not exploited (per MSRC) |
Product Description
msfs.sys implements the Windows Mailslot file system. A blocking mailslot
read parks its IRP on the mailslot’s data queue and installs a cancel
routine so the IRP can be cancelled. MsAddDataQueueEntry performs the enqueue
and cancel-routine setup.
Vulnerability Summary
On the a2 == 0 (blocking) path, pre-patch MsAddDataQueueEntry linked the IRP
into the data-queue list first, then installed the cancel routine with
MsSetCancelRoutine — a classic cancel-routine race:
- Between the enqueue and the
MsSetCancelRoutinecall, another thread’sCancelIocan run. Because the cancel routine is still NULL, the I/O manager only sets the IRP’s Cancel flag and does not invoke a routine. - The pre-patch code never re-checked the Cancel flag after installing the routine, so the cancellation is silently lost. The IRP stays permanently queued.
When the mailslot’s FCB/CCB objects are later freed, the still-queued IRP references freed memory — a use-after-free (CWE-416).
Prerequisites and Constraints
- Local, low-privileged (
PR:L,AV:L);AC:Hreflects the race window. - Race: issue a blocking mailslot read and
CancelIoit in the narrow window between the IRP being queued and the cancel routine being set. - Result: an orphaned queued IRP over freed FCB/CCB → UAF → EoP.
Vulnerability Details
Root Cause
The IRP was made cancellable-visible (enqueued) before the cancel routine was installed, and the Cancel flag was not re-checked, so a cancellation that lands in the gap is lost and the IRP is never removed/completed.
The patch (confirmed — diff, .4202 → .7824; enabled in .7840)
Gated behind Feature_1829438777, MsAddDataQueueEntry adopts the standard
set-then-recheck cancel protocol: it atomically installs the cancel routine,
immediately checks the Cancel flag, and if the IRP was already cancelled, removes
it from the queue and completes it with STATUS_CANCELLED:
// MsAddDataQueueEntry (patched) — from our diff
*(code **)(param_4 + 0x68) = MsCancelDataQueueIrp; // install cancel routine (atomic exchange)
_InterlockedExchange64((__int64 *)(irp + 0x68), (__int64)MsCancelDataQueueIrp);
if (*(byte *)(irp + 0x44) /* Cancel flag */
&& _InterlockedExchange64((__int64 *)(irp + 0x68), 0)) { // *** already cancelled? ***
MsRemoveDataQueueIrp(param_4, param_1); // remove from queue
*(int *)(irp + 0x30) = STATUS_CANCELLED; // complete with STATUS_CANCELLED
...
}
If the cancel arrives in the window, the recheck now catches it, the IRP is pulled
from the queue and completed, and no orphaned IRP is left to dangle over the freed
FCB/CCB. Our diff of msfs.sys 10.0.26100.4202 → .7824 confirms MsAddDataQueueEntry
gains the Feature_1829438777-gated cancel-routine install + Cancel-flag recheck +
MsRemoveDataQueueIrp completion; the February KB5077181 (.7840) ships it enabled.
Patch Completeness Assessment
CFR-gated behind Feature_1829438777. The set-then-recheck path runs only when
the flag is enabled; the original racy path still ships when disabled. Verify the
flag is enabled to confirm the fix is live.
Detection Guidance
Behavioural. Blocking mailslot reads cancelled immediately (CancelIo) under
churn; UAF / pool bugchecks referencing a mailslot data-queue IRP after the
mailslot handle is closed.
Crash signature. UAF in msfs!MsAddDataQueueEntry / MsCancelDataQueueIrp /
MsRemoveDataQueueIrp on unpatched/flag-disabled builds.
Config. The fix is CFR-gated — confirm Feature_1829438777 is enabled.
References
- MSRC advisory — CVE-2026-21253 (Windows Mailslot File System Elevation of Privilege), released 2026-02-10, KB5077181.
- Full binary diff:
/data/patch_diffs/msfs_sys-cve-2026-21253-ghidriff.md
Attack Path
A blocking mailslot IRP is enqueued before its cancel routine is set, so a racing CancelIo is lost and the IRP dangles over freed memory
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.
Exploits & PoC
Detection Rules
Acknowledgments
Anonymous