CVE-2025-49693 — Microsoft Brokering File System Elevation of Privilege Vulnerability
Executive Summary
Double free in Microsoft Brokering File System allows an authorized attacker to elevate privileges locally.
Overview
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows 11 Version 22H2 for ARM64-based Systems | 5062552 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 22H2 for x64-based Systems | 5062552 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5062552 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5062552 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems | 5062553 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for x64-based Systems | 5062553 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022, 23H2 Edition (Server Core installation) | 5062570 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 | 5062553 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 (Server Core installation) | 5062553 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5062552 |
Security Update | Yes |
5062553 |
Security Update | Yes |
5062570 |
Security Update | Yes |
Patch Diff
Double free (CWE-415) in the Microsoft Brokering File System driver bfs.sys BfsInsertPolicyEntry failure path, local EoP to SYSTEM (race, AC:H). Reached via \Device\Bfs IOCTL 0x228004 (BfsDeviceIoControl -> BfsProcessSetPolicyRequest). Handling a SetPolicy insert, BfsInsertPolicyEntry ExAllocatePool2's a policy entry (tag EsfB) plus pUserId and pContainerId (tag SsfB), assigns pUserId/pContainerId to NewPolicyEntry (ownership transfer), ref-counts (RefNo=2 after two InterlockedIncrements), inserts into the policy hash table, then provisions storage (BfsOpenPolicyDirectory/BfsCreateStorage). On failure it calls BfsDereferencePolicyEntryEx twice; the second drops RefNo to 0 and frees PolicyEntry->pUserId, ->pContainerId and the entry. The failure path THEN also ExFreePoolWithTag(pUserId)/ExFreePoolWithTag(pContainerId) on the same freed buffers -> double free / pool corruption. Diff of bfs.sys 10.0.26100.4484 -> .4652 (Jul 8 2025, KB5062553) confirms the fix: gated behind CFR flag Feature_3148938554, BfsInsertPolicyEntry nulls the local pUserId/pContainerId pointers immediately after ownership is transferred to the policy entry, so the failure-path ExFreePoolWithTag(pUserId/pContainerId) sees NULL and skips the second free. The BFS interface requires an AppSilo token (BfsIsApplicableToken / SeAppSiloSid), reached via AppContainer/AppSilo. Note: our diff shows Feature_3148938554 (build/arch); paired UAF is CVE-2025-49677.
| Function | Address | Change | Note |
|---|---|---|---|
BfsInsertPolicyEntry |
code change |
code (null local pUserId/pContainerId after ownership transfer, CFR-gated) | Pre: on BfsOpenPolicyDirectory/BfsCreateStorage failure, BfsDereferencePolicyEntryEx (RefNo->0) frees PolicyEntry->pUserId/->pContainerId, then the path also ExFreePoolWithTag(pUserId)/ExFreePoolWithTag(pContainerId) -> double free. Post (Feature_3148938554): sets local pUserId=0/pContainerId=0 right after NewPolicyEntry->pUserId/->pContainerId assignment, so the later frees are skipped. |
Feature_3148938554 |
gate |
added (CFR gate) | CFR flag gating the null-after-transfer double-free fix (and the paired policy-entry lifecycle rework); original path still ships when disabled. |
Attack Path
A failed BfsCreateStorage frees pUserId/pContainerId via the policy entry, then the failure path frees them again
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.
Known Exploits
Acknowledgments
ChenJian with Sea Security Orca Team