CVE-2026-25167 Local BFS Use After Free Privilege Escalation

  • Thread Author
Microsoft has published details for CVE-2026-25167, a use‑after‑free elevation‑of‑privilege flaw in the Microsoft Brokering File System (BFS) that can allow a locally‑accessible attacker to escalate to SYSTEM‑level privileges on unpatched machines; Microsoft lists the vulnerability in the March 2026 security updates and the record carries a CVSS v3.1 base score of 7.4 (High). (msrc.microsoft.com)

Background / Overview​

The Microsoft Brokering File System (commonly referenced by its driver, bfs.sys) is a kernel‑mode component that mediates file and pipe access for isolated or sandboxed Windows processes. Over the last two years BFS has been the subject of multiple memory‑management vulnerability disclosures — chiefly use‑after‑free and related heap corruption issues — driven by the complexity of policy management and object lifetime inside the driver. Those prior vulnerabilities form the immediate technical context for CVE‑2026‑25167 and explain why a new BFS issue receives heightened attention from defenders and researchers.
CVE‑2026‑25167 was published on March 10, 2026 and assigned by Microsoft (secure@microsoft.com); public aggregation sites show the CVSS vector as AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating a local attack vector, high complexity, but no prior privilege or user interaction required. The entry is classified under CWE‑416 (Use After Free). (cvedetails.com)

What the vulnerability is (technical summary)​

How use‑after‑free in BFS leads to privilege escalation​

A use‑after‑free (UAF) arises when kernel code frees an object and later continues to reference it — allowing an attacker to have that freed memory re‑allocated with attacker‑controlled contents. In kernel drivers such as bfs.sys the result can be corrupted function pointers, manipulated reference counts, or corrupted object state that the kernel executes at a higher privilege level.
For the BFS family, public technical write‑ups on prior issues describe a recurring pattern: BFS maintains policy and stream‑handle contexts for isolated processes and exposes IOCTLs (device control calls) that modify or delete those entries. If an attacker can trigger an ordering or reference‑counting race between threads or IOCTL paths, a policy entry can be freed while another thread continues to use it — creating a UAF that can be turned into an arbitrary write or code‑flow corruption in kernel context. While Microsoft’s advisory for CVE‑2026‑25167 does not publish proof‑of‑concept exploit code, public analyses of earlier BFS CVEs show realistic exploit paths that pair a UAF with carefully crafted heap grooming and kernel object reuse.

Attack prerequisites and impact​

  • Attack vector: Local. The attacker needs the ability to run code on the target machine (local shell or equivalent). (cvedetails.com)
  • Privileges required: None — the CVSS metadata indicates the bug can be reached without pre‑existing privileges. (cvedetails.com)
  • User interaction: None required. The flaw can be triggered programmatically. (cvedetails.com)
  • Impact if exploited: High confidentiality, integrity, and availability impact — a successful exploit can result in SYSTEM privileges, persistent installation of code, and full takeover of the host. (cvedetails.com)
Because the attacker requires local code execution (even as an unprivileged user), the practical risk depends on how easily an untrusted actor can obtain a foothold on target hosts. In corporate environments where local user accounts are tightly controlled and endpoint protections are broad, exploitation is harder; in multi‑user servers, terminal servers, or systems that accept user uploads/executables (CI/CD machines, build servers, developer laptops), the risk is materially higher.

Evidence, attribution, and confidence​

Microsoft is the owning source for this CVE entry and the advisory appears in the Security Update Guide; public CVE aggregators and major security outlets have re‑published the entry on the same day, giving this disclosure a high confidence rating: the vendor has acknowledged the issue and issued fixes. Aggregation sites show the CVE was published and updated on March 10, 2026 and list Microsoft as the source. (msrc.microsoft.com)
Independent coverage by mainstream security press also confirms the CVE’s inclusion in March 2026 Patch Tuesday bundles, and lists it among the set of “Important” Windows vulnerabilities fixed this month. That concurrence between Microsoft’s advisory and independent reporting signals the vulnerability is real, vendor‑confirmed, and addressed in official updates — the strongest possible evidence short of a public exploit being observed in the wild. (bleepingcomputer.com)
Note on exploit availability: at the time of publication there is no confirmed public proof‑of‑concept or credible evidence of active exploitation in the wild for CVE‑2026‑25167. That may change quickly; defenders should assume proof‑of‑concepts will appear in the coming days once researchers get the fix diff and reverse‑engineer the patched code. Feed aggregator summaries and initial threat reports currently list the entry with no EPSS score and no known weaponization.

Why BFS keeps showing up in EoP advisories​

Systemic causes​

  • Complexity of the subsystem: BFS services isolated/sandboxed Win32 workflows and must manage a variety of policy/tokens/handle contexts. Complex state machines and multiple IOCTL entry points increase the probability of race conditions and lifetime bugs. Public analyses of previous BFS bugs repeatedly point to policy deletion and stream‑handle context management as risky code paths.
  • Kernel memory management pitfalls: Kernel drivers demand exact reference counting and strict synchronization. Minor mistakes — missing locks, optimistic reference checks, or incorrect ordering — reliably lead to UAFs. When those drivers interact with user‑supplied inputs via IOCTLs, the attack surface increases.
  • Repeated fixes and regressions: The BFS family has been patched multiple times across 2024–2026, showing a pattern where fixes for one defect can leave adjacent code paths exposed or where deep refactors are needed to fully eliminate a class of errors. That pattern isn’t unique to Microsoft, but it explains why a component can be repeatedly reported.

What that means for defenders​

A repeated vulnerability family means defenders must treat BFS-related CVEs as a set: patching promptly is necessary, but monitoring for exploit attempts, applying kernel‑hardening mitigations, and viewing detection rules as “sticky” — reusable across multiple CVEs in the same component — gives better security posture than a one‑off update.

Patching and mitigation guidance​

Immediate actions (what every admin should do now)​

  • Apply Microsoft’s March 2026 security updates immediately to all affected Windows versions in your environment — prioritize servers and multi‑user systems where untrusted code can run. Microsoft lists CVE‑2026‑25167 in the March 2026 Security Update Guide; vendor patches are the authoritative remediation. (msrc.microsoft.com)
  • Where immediate patching isn’t possible, mitigate exposure by restricting local code execution for untrusted users:
  • Remove or restrict unnecessary local accounts.
  • Harden RDP/remote access, and enforce MFA for remote sessions.
  • Use Group Policy or endpoint controls to prevent execution from user‑writable locations.
  • Monitor EDR and kernel crash telemetry for unusual BFS activity: look for processes invoking BFS IOCTLs, bfs.sys crashes or bluescreens, or unexpected process births from user contexts to privileged contexts. Previous disclosures indicate BFS IOCTLs that manipulate policy entries are a likely attack path; hunting for anomalous device I/O control usage is a reasonable detection step.
  • Apply exploit mitigation controls where available: enable virtualization‑based security (VBS), HVCI / Kernel‑mode Hardware‑enforced Stack Protection, and aggressive Credential Guard settings on high‑risk endpoints. These mitigations raise the bar for kernel code‑execution and help prevent reliable exploitation even when memory corruption is present. Microsoft’s security guidance consistently recommends using platform protections alongside patching.

Longer‑term hardening​

  • Implement least‑privilege for all user accounts and services. Reduce the number of users who can run arbitrary code on servers.
  • Harden software distribution and image pipelines — CI systems and developer laptops frequently carry greater risk because they run unsigned or self‑built executables.
  • Maintain rapid patch testing and deployment channels for high‑risk components, and consider compensating controls (EDR policy adjustments, process whitelisting) to reduce exposure windows.

Detection and hunting playbook (practical tips)​

Below are detection ideas drawn from the typical BFS UAF attack mechanics and public technical notes from prior BFS disclosures. These are hunting heuristics, not guaranteed detection rules.
  • Hunt for bfs.sys stack or heap related crashes in kernel telemetry and Windows Error Reporting. UAF exploitation attempts often create driver crashes; a spike in bfs.sys‑related BSODs or WER entries around the time of attempted exploitation is a strong signal.
  • Look for anomalous IOCTL/device‑control patterns against the BFS device object. Unusual sequences of IOCTLs that create, modify, and delete policy/stream contexts are suspicious — particularly when initiated from unprivileged user processes. PixiePoint’s technical examination of prior BFS issues highlights the BfsProcessDeletePolicyRequest and related IOCTLs as relevant.
  • Monitor parent/child process relationships when a user‑space process suddenly spawns privileged service processes or attempts to write into system directories. An EoP exploit generally culminates in the creation of a SYSTEM‑owned process or service for persistence.
  • Endpoint EDR indicators: watch for attempts to overwrite kernel objects or for suspicious use of the NtDeviceIoControlFile / DeviceIoControl API targeting proprietary drivers. Most managed EDR products let analysts flag device‑control usage from nonstandard callers; tune rules to alert on unusual IoCTLs against BFS.
If you use a SIEM with Windows event ingestion, consider KQL or Sigma rules that flag: bfs.sys crashes, process creation with elevated tokens originating from unprivileged users, and DeviceIoControl calls to BFS device names from non‑system processes.

Risk analysis — who should worry most?​

  • High priority: Terminal servers, shared developer boxes, build agents, and any system that allows non‑privileged users to execute binaries. In those environments an unprivileged user can reasonably attempt to leverage a local EoP to pivot or persist. (cvedetails.com)
  • Medium priority: Standard corporate workstations that accept email attachments and run office productivity apps. An attacker first needs a foothold; if that foothold is established (e.g., a local meterpreter session), BFS EoP becomes a fast path to SYSTEM. (cvedetails.com)
  • Lower priority: Air‑gapped or tightly controlled critical infrastructure machines that don’t allow remote or local execution by untrusted accounts — but no environment should ignore the update, because patches are cheap and an exploit yields full host compromise.
The likelihood of exploitation depends heavily on two orthogonal factors: how easily attackers can obtain a local code execution foothold, and how quickly organizations apply the vendor patch. Given the broad utility of EoP exploits to attackers (they enable privilege escalation to persist, move laterally, and disable controls), the impact if exploited is severe even if the initial exploitation step is nontrivial.

What researchers and defenders should watch for next​

  • Rapid release of proof‑of‑concept exploit code. Historically, kernel UAF patches are fast followers: within days of an MSRC advisory appearing, the patch diff is analyzed and PoC code or exploit primitives appear. Defenders must assume PoC publication is likely and be ready to accelerate patch deployment accordingly.
  • Reuse of the same exploitation primitives across other BFS CVEs. Attackers and researchers will attempt to adapt previously developed heap grooming and IOCTL sequences from earlier BFS CVEs to this one. Detection strategies that work across the BFS family will remain useful.
  • Indicators of active exploitation in telemetry: abnormal bfs.sys crashes across many clients, sudden uptick in SYSTEM process creation from user contexts, or suspicious kernel memory writes detected by EDR. These signals should be triaged immediately.

Critical appraisal: strengths and remaining risks​

Notable strengths in Microsoft’s handling​

  • Vendor confirmation and fixes: Microsoft assigned the CVE, published the advisory in its Security Update Guide, and distributed fixes as part of the March 2026 patch cycle. Vendor confirmation raises the confidence level and gives organizations an authoritative remediation path. (msrc.microsoft.com)
  • Transparent CVSS and classification: The published CVSS and CWE classification makes it straightforward for defenders to triage and prioritize the patch. Aggregation sites mirror the vendor’s score and vector, improving situational awareness. (cvedetails.com)

Remaining concerns and risks​

  • Kernel exploits are powerful and reusable. Even if this particular CVE has a high attack complexity, kernel memory corruption is a rich target set. Skilled attackers often chain multiple primitives into reliable exploit routines; a single working exploit can be devastating.
  • Patch windows and operational friction. Many organizations delay kernel‑level patches until a maintenance window, leaving an exposure window that can be exploited if PoCs appear. The recurring nature of BFS vulnerabilities increases the operational burden — defenders must accelerate update testing and deployment. (bleepingcomputer.com)
  • Detection gaps. Not all EDR or logging setups capture IOCTL device‑control usage or subtle kernel memory corruption attempts. Without specific hunting rules many exploit attempts may be missed until they achieve SYSTEM and disable telemetry. Security teams should implement targeted detection informed by the vulnerability’s mechanics.

Recommended checklist for teams (quick reference)​

  • Apply March 2026 Microsoft security updates (prioritize servers and multi‑user hosts). (msrc.microsoft.com)
  • If patching is delayed, restrict local code execution, harden remote access, and isolate high‑risk systems.
  • Deploy or verify exploit mitigations: VBS, HVCI, Kernel‑mode hardware stack protection, Credential Guard.
  • Implement EDR and SIEM hunts for bfs.sys crashes, unusual DeviceIoControl calls, and suspicious process elevation events.
  • Track threat intelligence feeds and, if possible, subscribe to vendor advisories for changes to the vulnerability (proof‑of‑concept publication, active exploitation reports).

Conclusion​

CVE‑2026‑25167 is a high‑confidence, vendor‑confirmed use‑after‑free in the Microsoft Brokering File System that enables local elevation of privilege to SYSTEM. The issue is part of a broader family of BFS kernel driver vulnerabilities that have recurred in recent years, and it was included in Microsoft’s March 2026 security updates. While exploitation requires a local foothold and carries high complexity, the stakes are severe — a successful exploit yields full host compromise.
Action is straightforward and urgent: apply the vendor updates now, harden local execution paths where possible, and add targeted detection hunts for BFS IOCTL abuse and bfs.sys crashes. Given the historical pattern for BFS bugs (rapid researcher interest and eventual PoC publication), organizations that delay remediation increase their exposure window materially. Treat this CVE as a high‑priority kernel patch and verify deployment across all environments, especially multi‑user and developer systems. (msrc.microsoft.com)

Source: MSRC Security Update Guide - Microsoft Security Response Center