CVE-2025-53142 — Microsoft Brokering File System Elevation of Privilege Vulnerability
Executive Summary
Use after free in Microsoft Brokering 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 11 Version 22H2 for ARM64-based Systems | 5063875 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 22H2 for x64-based Systems | 5063875 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5063875 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5063875 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems 5063878 (Security Update) 5064010 (SecurityHotpatchUpdate) Important Elevation of Privilege 5062553 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.4946 10.0.26100.4851 Yes None Windows 11 Version 24H2 for x64-based Systems 5063878 (Security Update) 5064010 (SecurityHotpatchUpdate) Important Elevation of Privilege 5062553 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.4946 10.0.26100.4851 Yes None Windows Server 2022, 23H2 Edition (Server Core installation) | 5063899 (SecurityUpdate) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5063875 |
Security Update | Yes |
5063899 |
SecurityUpdate | Yes |
Patch Diff
Use-after-free (CWE-416) in the Microsoft Brokering File System (bfs.sys), the kernel component that evaluates per-container storage policy for AppContainer/packaged apps - reachable from low-privileged/sandboxed callers, so a local EoP. BfsGetPolicyEntry looks up/builds a reference-counted policy entry (local_90) carrying a type tag at +0x38 (0x10000001 / 0x10000000) and an embedded object pointer at +0x28. Pre-patch it consumed the +0x28 pointer without validating the +0x38 type tag and dropped the entry's reference via BfsDereferencePolicyEntryEx UNCONDITIONALLY on a path where the entry was still live/returned - freeing it while in use -> UAF on the kernel-pool policy entry. IN-HOUSE ghidriff of bfs.sys 10.0.26100.4768 -> .4946 (Aug 12 2025) confirms the fix: gated behind CFR flag Feature_1122292024, BfsGetPolicyEntry now validates the type tag first (uses +0x28 only when +0x38 == 0x10000001, rejects other types with 0xc0000001 before use) and makes BfsDereferencePolicyEntryEx conditional so the entry isn't freed while still owned; BfsCreateStorage gets matching lifetime hardening. With the flag disabled the patched binary keeps the original unconditional-deref behaviour. Credit: ChenJian (Sea Security Orca Team); hazard.
| Function | Address | Change | Note |
|---|---|---|---|
BfsGetPolicyEntry |
code change |
code (type validation + conditional deref, CFR-gated) | Pre: consumes *(lVar3+0x28) without validating the +0x38 type tag, then calls BfsDereferencePolicyEntryEx(local_90,0) unconditionally. Post (Feature_1122292024 enabled): if (*(int*)(lVar3+0x38)==0x10000001) use +0x28; else if (!=0x10000000) reject with 0xc0000001 (goto error); and the BfsDereferencePolicyEntryEx(local_90,0) call is made conditional so the entry isn't dropped while still in use - eliminating the UAF. |
BfsCreateStorage |
code change |
code (lifetime hardening under same flag) | Restructured under Feature_1122292024 with reordered checks / gotos around table-entry alloc/free (BfsAllocateTableEntry/BfsFreeTableEntry) to harden the storage-creation path alongside the policy-entry fix. |
Feature_1122292024 |
new flag |
added (CFR gate) | New Controlled Feature Rollout flag introduced by this patch; gates the type-validation and conditional-deref fix in BfsGetPolicyEntry (and BfsCreateStorage). Both branches ship in .4946. |
Attack Path
A Brokering File System policy entry is dereferenced (freed) while still in use, giving a use-after-free from a low-privileged caller
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
hazard