Important CVSS 7.8 EPSS 0.00338 🔬 Patch diffed 2026-07 archive

Executive Summary

Heap-based buffer overflow in Windows Resilient File System (ReFS) allows an unauthorized attacker to execute code locally.

Overview

7.8
CVSS HIGH
Important
MS Severity
Not Exploited
MS Exploit Status
Exploitation Unlikely
MS Exploit Likelihood
Category Remote Code Execution
Released Jul 14 2026
Last Updated Jul 14 2026
Publicly Disclosed No
CISA KEV Not Listed
Known Exploits None Known
EPSS Score 0.00338 — 0.26643 percentile
NVD CVSS 7.8 HIGH — matches MSRC

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
ATTACK VECTOR
Local
ATTACK COMPLEXITY
Low
PRIVILEGES REQUIRED
Low
USER INTERACTION
None
SCOPE
Unchanged
CONFIDENTIALITY
High
INTEGRITY
High
AVAILABILITY
High
EXPLOIT CODE MATURITY
Unproven
REMEDIATION LEVEL
Official Fix
REPORT CONFIDENCE
Confirmed
Temporal Score: 6.8

EPSS Score

0.00338
probability of exploitation in the next 30 days
0.26643 percentile - updated 2026-08-14
View on FIRST.org

Affected Products

23 affected products
Product KB Article Severity Impact Restart Required
Windows 10 Version 1607 for 32-bit Systems 5099535 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 1607 for x64-based Systems 5099535 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 1809 for 32-bit Systems 5099538 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 1809 for x64-based Systems 5099538 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 21H2 for 32-bit Systems 5099539 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 21H2 for ARM64-based Systems 5099539 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 21H2 for x64-based Systems 5099539 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 22H2 for 32-bit Systems 5099539 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 22H2 for ARM64-based Systems 5099539 (Security Update) Important Remote Code Execution Yes
Windows 10 Version 22H2 for x64-based Systems 5099539 (Security Update) Important Remote Code Execution Yes
Windows 11 Version 24H2 for ARM64-based Systems 5101650 (Security Update) Important Remote Code Execution Yes
Windows 11 Version 24H2 for x64-based Systems 5101650 (Security Update) Important Remote Code Execution Yes
Windows 11 Version 25H2 for ARM64-based Systems 5101650 (Security Update) Important Remote Code Execution Yes
Windows 11 Version 25H2 for x64-based Systems 5101650 (Security Update) Important Remote Code Execution Yes
Windows 11 Version 26H1 for ARM64-based Systems 5101649 (Security Update) Important Remote Code Execution Yes
Windows 11 version 26H1 for x64-based Systems 5101649 (Security Update) Important Remote Code Execution Yes
Windows Server 2016 5099535 (Security Update) Important Remote Code Execution Yes
Windows Server 2016 (Server Core installation) 5099535 (Security Update) Important Remote Code Execution Yes
Windows Server 2019 5099538 (Security Update) Important Remote Code Execution Yes
Windows Server 2019 (Server Core installation) 5099538 (Security Update) Important Remote Code Execution Yes
Windows Server 2022 5099540 (Security Update) Important Remote Code Execution Yes
Windows Server 2025 5099536 (Security Update) Important Remote Code Execution Yes
Windows Server 2025 (Server Core installation) 5099536 (Security Update) Important Remote Code Execution Yes

Patches

7 patches
Article Type Restart
5099535 Security Update Yes
5099538 Security Update Yes
5099539 Security Update Yes
5101650 Security Update Yes
5101649 Security Update Yes
5099540 Security Update Yes
5099536 Security Update Yes

Patch Diff

ghidriff · refs.sys (KB5099540)
Unverified — heuristic guess

Kernel heap-based buffer overflow (CWE-122) in the Windows ReFS driver refs.sys checkpoint serialization, mount-time arbitrary code execution (Important, RCE, AV:L, UI:R, CVSS 7.8). A producer/consumer bug separated in time: a crafted ReFS checkpoint carries an excessive globalTableCount (DWORD at record + 0x90). PRE: CmsVolume::ValidateCheckpointRecord accepts the count as long as it is internally consistent with the INPUT record - the key check count <= size >> 2 && count > 4 bounds it only against the input checkpoint's own size (a larger crafted record raises the permitted count), plus offset-table-inside-record checks; nothing bounds it against the destination buffer. During mount, ReadLatestCheckpoint promotes it to persistent kernel state as volume + 478 = count - 13, losing its untrusted origin. Later CmsVolume::FormatCheckpointRecord restores count = volume[478] + 13 and writes that many offset-table entries and serialized roots into the fixed checkpoint record buffer with NO comparison of the final cursor against the buffer size - a kernel OOB write. Mounting a crafted ReFS image (AV:L, UI:R) reaches the path, yielding kernel code execution. Diff of refs.sys 10.0.20348.4893 -> .5386 (Jul 14 2026, KB5099540, Server 2022) confirms the fix: the formatter is logically unchanged (only relocated); the CVE-relevant delta is an ABSOLUTE count cap added to ValidateCheckpointRecord (ratio 0.37), gated behind CFR flags Feature_1337977145 / Feature_3102454072, rejecting the oversized globalTableCount before it is promoted to persistent state. Cross-checked against an independent writeup; functions (ValidateCheckpointRecord / FormatCheckpointRecord / ReadLatestCheckpoint) and offsets (+0x90 count, volume+478) match the ghidriff.

Pre-patch version 10.0.20348.4893 Download
Post-patch version 10.0.20348.5386 Download
Loading diff…
Select a function to see its diff.
View full diff report View RCA report

Root Cause Analysis

CVE-2026-58530 — Windows ReFS refs.sys Checkpoint globalTableCount Not Bounded to Destination → Heap Buffer Overflow (Mount-Time RCE)


Summary

Product Windows — refs.sys (Resilient File System / ReFS driver)
CVE ID CVE-2026-58530
Impact Remote Code Execution (local; kernel arbitrary code execution)
MSRC severity Important
CVSS 7.8 / 6.8 — CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
CWE CWE-122: Heap-based Buffer Overflow (kernel out-of-bounds write)
Delivery Local — user mounts a specially crafted ReFS image
KB / Fixed build (diffed lineage, Server 2022) KB5099540 — refs.sys 10.0.20348.5386
Other affected SKUs 24H2 26100.8875, 25H2 26200.8875, 26H1 28000.2525, Server 2025 26100.33158, Server 2019/2016, Win10 (per MSRC)
Patch Date July 14, 2026 (2026-Jul)
Pre-patch binary refs.sys 10.0.20348.4893 — SHA256 a69d3df36a5917b354c7ef791745e2c729866365db6ff5f3020e790e1fe1ea7a
Post-patch binary refs.sys 10.0.20348.5386 — SHA256 d7d7569d7b0fe668ff31221f5b1bcd7801b84b0fec60f4392d2e1368e6fcf0a8
Feature flag Feature_1337977145 / Feature_3102454072 — the fix is CFR-gated
Exploitability Exploitation Unlikely; not publicly disclosed; not exploited (per MSRC)

Lineage note: this diff is the Server 2022 (build 20348) pair .4893 → .5386 (KB5099540). The same fix ships across the affected ReFS SKUs. Analysis corroborated by an independent writeup (CVE-2026-58530); functions and offsets match the ghidriff.


Product Description

refs.sys is the Resilient File System (ReFS) driver. During volume mount it reads the on-disk checkpoint and validates it (CmsVolume::ReadLatestCheckpoint → CmsVolume::ValidateCheckpointRecord); later it re-serializes a checkpoint to disk (CmsVolume::FormatCheckpointRecord). A checkpoint record carries a global table entry count (globalTableCount) as the DWORD at record + 0x90, followed by an offset table.


Vulnerability Summary

This is a producer/consumer bug separated in time. A crafted checkpoint can carry an excessive globalTableCount at record + 0x90. Pre-patch, ValidateCheckpointRecord accepted the count as long as it was internally consistent with the input record — the key check count <= size >> 2 && count > 4 bounds the count only against the input checkpoint’s own size, so a larger crafted record simply raises the permitted count (a 0x4000-byte record allows count up to 0x1000). It says nothing about the destination buffer. During mount, ReadLatestCheckpoint promotes the value into persistent kernel state as volume + 478 = count - 13 (extended-root count), losing all memory of its untrusted origin. Later, FormatCheckpointRecord restores count = volume[478] + 13 and writes that many offset-table entries and serialized roots into the fixed checkpoint record buffer — with no comparison of the final cursor against that buffer’s size — a kernel heap out-of-bounds write (CWE-122). Reaching the path only requires a user to mount a crafted ReFS image (AV:L, UI:R), yielding kernel code execution.


Prerequisites and Constraints

  • Local; no privileges (PR:N) but user interaction (UI:R): the victim mounts a specially crafted ReFS image / VHD.
  • The image’s checkpoint carries a globalTableCount (e.g. 0x160) that passes the record-local checks but exceeds what the destination checkpoint buffer can hold.
  • Result: FormatCheckpointRecord serializes too many entries/roots past the buffer.

Vulnerability Details

Root Cause

globalTableCount was validated only relative to the input record’s size (and offset-table consistency), never against the size of the destination checkpoint buffer it later drives. The accepted count is stored into the volume object (count - 13) and restored later (count = [478] + 13) unchanged, so the formatter writes an attacker-chosen number of entries with no destination bound.

The patch (confirmed — diff, .4893 → .5386)

The formatter (FormatCheckpointRecord) is logically unchanged (only relocated); the CVE-relevant delta is an absolute count cap added to ValidateCheckpointRecord, gated behind the CFR flag, so the oversized count is rejected at read time before it is promoted to persistent state:

// CmsVolume::ValidateCheckpointRecord — PRE (record-local check only)
uVar1 = *(uint*)((char*)record + 0x90);        // globalTableCount
if (uVar1 <= size >> 2 && uVar1 > 4) {         // bound is the INPUT size — not a real limit
    // ... offset-table entries must lie inside the record (record-local checks) ...
}

// POST (10.0.20348.5386) — an ABSOLUTE cap is enforced (Feature_1337977145 / Feature_3102454072)
uVar1 = *(uint*)((char*)record + 0x90);
if (feature_enabled && uVar1 > MAX_GLOBAL_TABLE_COUNT)   // *** reject oversized count ***
    return 0;                                            // checkpoint rejected before promotion
if (uVar1 <= size >> 2 && uVar1 > 4) { ... }

With globalTableCount capped to what the destination checkpoint buffer can actually hold, the value promoted into volume[478] and later restored by FormatCheckpointRecord can no longer drive an out-of-bounds serialization, closing the overflow at the validator (the sink in the formatter is left unchanged).

Patch Completeness Assessment

CFR-gated behind Feature_1337977145 / Feature_3102454072. The cap runs only when the flag is enabled; the original record-local-only validation still ships when disabled. Verify the flag is enabled to confirm the fix is live. Because the sink in FormatCheckpointRecord is unchanged, the defense depends entirely on the validator rejecting the oversized count.


Detection Guidance

Behavioural. Pool-corruption / bugcheck crashes in refs!CmsVolume::FormatCheckpointRecord (or ValidateCheckpointRecord) when mounting ReFS volumes/VHDs on unpatched/flag-disabled builds; a ReFS bugcheck/invariant failure (0x149 trace) during checkpoint persistence. Restrict mounting of untrusted ReFS images / VHDs; treat attacker-supplied disk images as dangerous.

Config. The fix is CFR-gated — confirm Feature_1337977145 is enabled.


References

  • MSRC advisory — CVE-2026-58530 (Windows Resilient File System (ReFS) Remote Code Execution), released 2026-07-14, KB5099540 (Server 2022) and per-SKU KBs.
  • Full binary diff: /data/patch_diffs/refs_sys-cve-2026-58530-ghidriff.md

Attack Path

A crafted ReFS checkpoint globalTableCount passes record-local validation, then overflows the destination checkpoint buffer during formatting

Attack path for CVE-2026-58530 A crafted ReFS checkpoint globalTableCount passes record-local validation, then overflows the destination checkpoint buffer during formatting 01 — ENTRY Victim mounts a crafted ReFS image / VHD refs.sys reads and validates the on-disk checkpoint (ReadLatestCheckpoint / ValidateCheckpointRecord). AV:L / PR:N / UI:R (requires the user to mount the image). 02 — CONTROLLED INPUT Checkpoint carries an oversized globalTableCount (record + 0x90) A count such as 0x160 passes the record-local checks (count <= size>>2, offset table inside the record) with a recomputed self-checksum, but exceeds what the destination buffer holds. 03 — MISSING CHECK Count promoted then consumed without a destination bound (CWE-122) ReadLatestCheckpoint stores count-13 into volume+478; FormatCheckpointRecord restores count and serializes that many entries/roots into the fixed checkpoint buffer with no cursor-vs-size check - a kernel OOB write. 04 — IMPACT Kernel heap overflow -> code execution The out-of-bounds write corrupts adjacent kernel pool state during checkpoint formatting, exploitable for arbitrary code execution (Important, 7.8).

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

Donghyeon Oh
Jonghoi Kim
R4nger with Kunlun Lab & Zhiniang Peng with HUST