CVE-2026-42980 — NT OS Kernel Elevation of Privilege Vulnerability
Executive Summary
Integer underflow (wrap or wraparound) in Windows NT OS Kernel allows an authorized attacker to elevate privileges locally.
Overview
Verified Attribution
Binary/function confirmed from a public vendor or researcher report; this pin overrides the keyword heuristic.
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 10 Version 1607 for 32-bit Systems | 5094122 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1607 for x64-based Systems | 5094122 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for 32-bit Systems | 5094123 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for x64-based Systems | 5094123 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for 32-bit Systems | 5094127 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5094127 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5094127 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5094127 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5094127 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5094127 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5093998 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5093998 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems | 5094126 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for x64-based Systems | 5094126 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 25H2 for ARM64-based Systems | 5094126 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 25H2 for x64-based Systems | 5094126 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 26H1 for ARM64-based Systems | 5095051 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 version 26H1 for x64-based Systems | 5095051 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 | 5094042 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 (Server Core installation) | 5094042 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 R2 | 5094041 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2012 R2 (Server Core installation) | 5094041 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2016 | 5094122 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2016 (Server Core installation) | 5094122 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 | 5094123 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 (Server Core installation) | 5094123 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022 | 5094128 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022 (Server Core installation) | 5094128 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 | 5094125 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 (Server Core installation) | 5094125 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5094122 |
Security Update | Yes |
5094123 |
Security Update | Yes |
5094127 |
Security Update | Yes |
5093998 |
Security Update | Yes |
5094126 |
Security Update | Yes |
5095051 |
Security Update | Yes |
5094042 |
Monthly Rollup | Yes |
5094041 |
Monthly Rollup | Yes |
5094128 |
Security Update | Yes |
5094125 |
Security Update | Yes |
Patch Diff
WMI integer underflow (CWE-191 -> CWE-787): nt!WmipQueryAllDataMultiple (IOCTL 0x22812C) and nt!WmipQuerySingleMultiple (IOCTL 0x228130) subtract an 8-aligned provider-reported size from a 32-bit remaining-output counter without checking it fits. A WMI instance whose serialized size R is not 8-aligned (slop) passes the requiredSize=(DataSize+73)&~7 gate yet wraps the counter (R - ALIGN8(R)); the next WNODE item is then serialized out of bounds past the kernel SystemBuffer, giving a controlled OOB write (used by the public G4sp4rCS exploit to corrupt sprayed npfs data queue entries -> arbitrary read -> SYSTEM token). VERIFIED 2026-07-20: the saturating-subtract fix ships in BOTH builds behind WIL flag Feature_1045423416; KB5101650 is a CFR flag enablement, not a code change — ghidriff shows 0 changes in the WMI path (70,713/70,714 functions matched, 6 unrelated churn).
Root Cause Analysis
CVE-2026-42980 — Windows Kernel WMI Integer Underflow (WmipQuerySingleMultiple / WmipQueryAllDataMultiple) → OOB Write → EoP
Summary
| Product | Microsoft Windows — ntoskrnl.exe (WMI kernel subsystem) |
|---|---|
| Vendor | Microsoft Corporation |
| Severity | Important (MSRC) — CVSS 7.8 High |
| Affected Versions | Windows 11 24H2 (and other SKUs) before the July 2026 security updates |
| Tested Version | Windows 11 24H2 — ntoskrnl 10.0.26100.8737 (pre-patch, KB5095093) vs 10.0.26100.8875 (post-patch, KB5101650) |
| Impact | Elevation of Privilege — unsigned-integer underflow → OOB kernel pool write → SYSTEM |
| CVE ID | CVE-2026-42980 |
| CWE | CWE-191 (Integer Underflow) → CWE-122 (Heap-based Buffer Overflow) (per MSRC; consequence class also mappable to CWE-787 Out-of-bounds Write) |
| Vulnerable functions | nt!WmipQueryAllDataMultiple (IOCTL 0x22812C), nt!WmipQuerySingleMultiple (IOCTL 0x228130) |
| PoC Available | Yes — full LPE by G4sp4rCS; blue-team trigger/detector below derived from it |
| Patch Available | Yes — July 2026 (KB5101650 on Win11 24H2) |
| Fix | Saturating subtraction behind WIL flag Feature_1045423416 |
CVSS 3.1 Detailed Scoring
Base Score: 7.8 (HIGH) — Temporal Score: 6.8 (per MSRC)
Vector String: 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 (MSRC; base metrics AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Rationale for the base metrics (matches the MSRC assessment):
| Metric | Value | Rationale |
|---|---|---|
| Attack Vector (AV) | Local | IOCTLs to \Device\WMIDataDevice from a local process |
| Attack Complexity (AC) | Low | Deterministic window discovery at runtime; no race |
| Privileges Required (PR) | Low | Standard user; WMI data device is accessible without admin |
| User Interaction (UI) | None | — |
| Scope (S) | Unchanged | — |
| C/I/A | High | Full kernel read/write achieved → token theft → SYSTEM |
Product Description
Windows Management Instrumentation (WMI) is the kernel + user-mode
infrastructure for querying system telemetry: hardware state, drivers,
performance counters, power settings, monitors, SMBIOS data, and more.
User-mode consumers go through advapi32.dll (WmiOpenBlock,
WmiQueryAllDataW) or talk directly to the kernel WMI data device
(\Device\WMIDataDevice) with DeviceIoControl /
NtDeviceIoControlFile.
Two kernel IOCTL handlers serialize multiple WMI data items into one caller buffer:
IOCTL_WMI_QUERY_ALL_DATA_MULTIPLE=0x22812C→nt!WmipQueryAllDataMultipleIOCTL_WMI_QUERY_SINGLE_MULTIPLE=0x228130→nt!WmipQuerySingleMultiple
Both loops keep a running 32-bit remaining output counter as they pack WNODE records into the buffer.
Vulnerability Summary
Both loops subtract an 8-aligned, provider-reported size from the remaining counter without checking it fits:
// nt!WmipQueryAllDataMultiple — vulnerable sub @ +0x29a
AlignedSize = (QueryInfo[0] + 7) & 0xFFFFFFF8;
OutputBufferLength -= AlignedSize; // unchecked
// nt!WmipQuerySingleMultiple — vulnerable sub @ +0x401
AlignedActualSize = (ReturnedDataSize + 7) & 0xFFFFFFF8;
OutBufferSize -= AlignedActualSize; // unchecked
The exploitable mismatch in WmipQuerySingleMultiple:
- the capacity gate uses a caller-influenced estimate
requiredSize = (DataSize + 73) & ~7, - the subtraction uses the provider-returned actual size
ALIGN8(ReturnedDataSize).
Pick a WMI instance whose real serialized size R is not 8-aligned and
set outLen = R:
gate: requiredSize <= R -> accepted
subtract: R - ALIGN8(R) -> wraps (e.g. 0x94 - 0x98 = 0xFFFFFFFC)
The kernel now believes the output buffer has ~4 GB free, and the next
WNODE item in the same request is serialized out of bounds past the kernel
SystemBuffer — an OOB write with attacker-controlled bytes at
OOB_WNODE + 0x42 (instance-data copy).
The patch replaces both subtractions with a saturating form gated by
Feature_1045423416: on underflow the counter clamps to 0, the next item
fails the capacity gate, and no OOB write occurs.
Prerequisites and Constraints
- Local authenticated session, standard user (no admin)
\Device\WMIDataDeviceopenable directly, or via the WMI device interface GUID{3c0d501a-140b-11d1-b40f-00a0c9223196}(cfgmgr32 fallback)- At least one enumerable WMI instance whose measured serialized size
Ris not 8-aligned (“slop”) — the PoC scans a GUID dataset at runtime (WmiOpenBlock+WmiQueryAllDataW+ a binary search ofR), so no hardcoded provider is required - No race condition; the whole trigger is one IOCTL with two items
Vulnerability Details
Reaching the bug from userspace (the “hint”)
| Interface | Role |
|---|---|
CreateFile("\\.\GLOBALROOT\Device\WMIDataDevice") |
open the WMI data device |
DeviceIoControl(dev, 0x228130, in, 0xFF0, out, R) |
the trigger — IOCTL_WMI_QUERY_SINGLE_MULTIPLE with a two-item input |
WmiOpenBlock / WmiQueryAllDataW (advapi32) |
enumerate GUIDs/instances to find one with non-aligned R |
DeviceIoControl(dev, 0x228130, ..., outLen=mid) probes |
binary-search the exact R (watch WNODE.Flags & 0x20 = WF_TOO_SMALL) |
IOCTL 0x22812C |
alternate vulnerable path (WmipQueryAllDataMultiple) |
Input layout for 0x228130 (each 0x18-byte item becomes one WNODE):
struct WMI_QSM_INPUT { // METHOD_BUFFERED input
ULONG ItemCount; // +0x00 = 2
// +0x04 pad
WMI_QSM_ITEM Items[2]; // +0x08
};
struct WMI_QSM_ITEM { // 0x18 bytes
UINT64 InstanceCookieOrHandle; // +0x00 — REAL open WMI handle for item[0]
USHORT DataSize; // +0x08 — instance name length
USHORT DataFlags; // +0x0A
ULONG Reserved; // +0x0C
UINT64 InputData; // +0x10 — user-mode ptr to name bytes
};
Note: item[0].InstanceCookieOrHandle must be a real open WMI GUID handle
(WmiOpenBlock); with 0, ObReferenceObjectByHandle fails and the
vulnerable subtraction is never reached.
Complete kernel call flow
User mode:
WmiOpenBlock(guid, WMIGUID_QUERY|EXECUTE, &h) // open instance handle
WmiQueryAllDataW(h, ...) // enumerate instance names
CreateFile("\\.\GLOBALROOT\Device\WMIDataDevice")
DeviceIoControl(dev, 0x228130, in, 0xFF0, out, R) // TRIGGER
│ NtDeviceIoControlFile → I/O manager
▼
Kernel mode (ntoskrnl.exe):
nt!WmipIoControl [device dispatch]
switch (ioctl):
0x22812C → nt!WmipQueryAllDataMultiple [*** vulnerable sub @ +0x29a ***]
0x228130 → nt!WmipQuerySingleMultiple [*** vulnerable sub @ +0x401 ***]
│ per item:
│ requiredSize = (DataSize + 73) & ~7 // capacity GATE
│ if (requiredSize > outRemaining) → WF_TOO_SMALL scratch path
│ → nt!WmipQueryAllData / WmipQuerySetExecuteSI
│ → nt!WmipForwardWmiIrp → WMI provider (returns actual size)
│ alignedActualSize = (ReturnedDataSize + 7) & ~7
│ outRemaining -= alignedActualSize // ← WRAPS for item[0]
│ wnodeCursor += alignedActualSize
│ item[1]: gate sees wrapped (huge) outRemaining → accepted
│ memmove(wnodeCursor->InstanceData, item[1].Data, DataSize)
│ ── OOB write past SystemBuffer, controlled bytes at +0x42 ──
▼
(exploit) overwritten NP_DATA_QUEUE_ENTRY of a sprayed named pipe
Why SystemBuffer size and pipe spray matter
IOCTL 0x228130 is METHOD_BUFFERED: the kernel allocates the SystemBuffer
as max(InputBufferLength, OutputBufferLength). Setting inLen = 0xFF0
places it in the 0x1000 pool bucket — the same bucket as sprayed npfs
NP_DATA_QUEUE_ENTRY objects (0x30 header + 0xFF0 data body). The
exploit sprays pipes to build a stable sequence of same-sized pipe data
objects, frees one entry (hole), fires the
IOCTL so the SystemBuffer lands in the hole, and the OOB WNODE write from
item[1] lands on the adjacent pipe entry’s header.
Overwrite geometry (dynamic, per measured window):
phase = (alignedActualSize + 0x42) & 0xFFF; // WNODE instance-data offset
overwriteOffset = phase ? (0x1000 - phase) : 0;
The patch
Both functions get the identical saturating subtraction, gated by
Feature_1045423416:
v = OutBufferSize - AlignedActualSize;
if (Feature_1045423416__private_IsEnabledDeviceUsageNoInline())
v = -(unsigned int)(AlignedActualSize < OutBufferSize) & v;
OutBufferSize = v; // underflow → 0, not 0xFFFFFFFF
With the counter clamped to zero, the next item’s requiredSize check fails
and serialization stops before any OOB write.
Patch-diff verification (ghidriff + GhidraMCP, 2026-07-20)
A full ghidriff VersionTracking diff of ntoskrnl 10.0.26100.8737 vs
10.0.26100.8875 matched 70,713 / 70,714 functions with only 6
code-changed functions (FSRTL oplock, Secure Boot/BCD, hotpatch and heap
churn) — none in the WMI path. Live decompilation of the pre-patch
.8737 binary via GhidraMCP confirms why: the saturating-subtraction code
above is already compiled into both builds — WmipQuerySingleMultiple @
0x1407a4fc0 and WmipQueryAllDataMultiple both contain the flag check and
both branches, and both Feature_1045423416__private_IsEnabledDeviceUsageNoInline
(@ 0x14064a9d4) and ..._IsEnabledFallback (@ 0x14064aa0c) exist
pre-patch. KB5101650 did not add the fix; it enabled it — the patch is a
Controlled Feature Rollout flag flip, with the flag state living in
servicing/rollout data outside what a function-level binary diff compares.
Detection and hunting should therefore key on behavior (the IOCTL patterns
below), not on byte signatures of a “patched” function.
Exploitation Scenario (G4sp4rCS public chain)
- Detect build, select EPROCESS/TOKEN/IRP offsets.
- Spray named pipes filled to create 0x1000-byte
NpFrdata queue entries; free one (hole). - Calibrate: scan WMI GUID dataset → instance with slop
(
R=0x94, aligned=0x98preferred; fallback windows computed dynamically, e.g.R=0x9C/aligned=0xA0→overwriteOff=0xF1E). - Trigger #1 (
0x228130, two items): underflow + OOB write inflates a pipe entry’s readable size →PeekNamedPipeover-read leaks npfs links at+0xFD0(flink/blink). - Trigger #2: reshape the corrupted entry as an IRP-backed queue entry →
arbitrary kernel read via
PeekNamedPipe. - Walk
IRP → ETHREAD → EPROCESS → ActiveProcessLinks → PID 4 → SYSTEM token. - Token write: an IRP completion/write path writes the SYSTEM token into
the current process token; repair the pipe entry; spawn
cmd.exeas SYSTEM.
Observed candidate WMI providers (build-dependent — the PoC resolves at
runtime): WmiMonitorConnectionParams (guid#156), MSNdis_CoTransmitPduErrors
(#27), MSPower_DeviceEnable (#463), MSSmBios_RawSMBiosTables (#506),
MS_SystemInformation (#553), MSDiskDriver_Performance (#658).
Trigger PoC
See poc/poc_cve_2026_42980.c
(+ poc_cve_2026_42980_wmi_guids.h GUID dataset). Derived from G4sp4rCS’s
exploit, reduced to the blue-team stages: resolve a slop instance → spray
pipes → fire the two-item 0x228130 trigger → detect the corrupted pipe
via PeekNamedPipe over-read. It does not build the arbitrary-read/token
stages.
- Pre-patch VM:
[!] VULNERABLE: corrupted pipe found— kernel pool is corrupt at that point; run only in a snapshotted VM and reboot after. - Patched: counter saturates; no corruption detected.
Detection Rules
YARA — PoC tooling
rule CVE_2026_42980_WMI_Underflow_PoC {
meta:
description = "Detects CVE-2026-42980 WMI underflow PoC binaries"
author = "OnlyFm252"
date = "2026-07-19"
cve = "CVE-2026-42980"
tlp = "white"
strings:
$dev = "WMIDataDevice" ascii wide nocase
$api1 = "WmiOpenBlock" ascii
$api2 = "WmiQueryAllDataW" ascii
$api3 = "PeekNamedPipe" ascii
$ioctl = { 30 81 22 00 } // 0x00228130 little-endian
$pipe = "\\\\.\\pipe\\" ascii wide nocase
condition:
uint16(0) == 0x5A4D and filesize < 2MB and
$dev and $ioctl and ($api1 or $api2) and ($api3 or $pipe)
}
Sigma — suspicious WMI data-device access
title: Direct WMIDataDevice Access by Non-System Process (CVE-2026-42980)
id: 4a2b6c80-4298-0cde-8ab1-202607080001
status: experimental
description: >
Detects processes opening \Device\WMIDataDevice directly. CVE-2026-42980
is triggered by DeviceIoControl 0x228130/0x22812C against this device;
legitimate consumers almost always go through advapi32 WMI APIs instead.
author: OnlyFm252
date: 2026/07/19
references:
- https://github.com/G4sp4rCS/CVE-2026-42980-POC
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|contains: 'WMIDataDevice'
condition: selection
falsepositives:
- WMI management/monitoring software
level: high
tags:
- attack.privilege_escalation
- attack.t1068
- cve.2026.42980
Sigma — named-pipe spray + WMI correlation
title: Mass Named Pipe Creation Followed by WMI Activity (CVE-2026-42980)
id: 5b3c7d91-4298-1def-9bc2-202607080002
status: experimental
description: >
The CVE-2026-42980 exploit sprays a large number of same-sized pipe data
objects for pool grooming immediately before the WMI IOCTL trigger. Alert on a
single process creating an abnormal number of named pipes.
author: OnlyFm252
date: 2026/07/19
logsource:
category: pipe_created
product: windows
detection:
selection:
PipeName|contains: ''
condition: selection | count(Image) by Image > 500
timeframe: 30s
falsepositives:
- Pipe-heavy IPC servers (rarely exceed hundreds of instances in seconds)
level: high
tags:
- attack.privilege_escalation
- attack.t1068
- cve.2026.42980
Sysmon configuration
<!-- Sysmon rules for CVE-2026-42980 detection -->
<RuleGroup name="CVE-2026-42980" groupRelation="or">
<!-- Event 17: mass pipe creation (pool spray) -->
<PipeEvent onmatch="include">
<Rule name="PipeSpray" groupRelation="and">
<Image condition="excludes">C:\Windows\</Image>
<Image condition="excludes">C:\Program Files\</Image>
</Rule>
</PipeEvent>
<!-- Event 8/9 raw access to WMI device is not directly logged;
pipe telemetry + image load of advapi32 WMI usage is the proxy -->
<ImageLoad onmatch="include">
<Rule name="WMI_API_Load" groupRelation="and">
<ImageLoaded condition="end with">wmipcoredll.dll</ImageLoaded>
<Image condition="excludes">C:\Windows\</Image>
</Rule>
</ImageLoad>
</RuleGroup>
Remediation
- Apply KB5101650 (July 2026) or later. Verify
ntoskrnl.exe ≥ 10.0.26100.8875. - Deploy the detections above — direct
WMIDataDeviceopens by user processes and burst pipe creation are high-signal, low-noise. - Restrict
\Device\WMIDataDeviceACLs in hardened builds if WMI device-interface access isn’t needed by standard users. - Hunt: crash dumps (bugchecks) referencing
nt!WmipQuerySingleMultiple/nt!WmipQueryAllDataMultipleon pre-patch builds.
Timeline
| Date | Event |
|---|---|
| 2026-06-09 | Microsoft publishes CVE-2026-42980 in the June 2026 security updates (MSRC; Important, EoP) |
| 2026-07-07 | G4sp4rCS publishes full analysis + LPE exploit (repo created 2026-07-07) |
| 2026-07-14 | July 2026 Patch Tuesday — KB5101650 (Win11 24H2) enables the Feature_1045423416 fix |
| 2026-07-19 | This analysis: blue-team package derived from the public PoC |
| 2026-07-20 | ghidriff diff completed + GhidraMCP verification: fix is a Feature_1045423416 CFR flag flip — patched code already present in the pre-patch build |
References
- G4sp4rCS — CVE-2026-42980 writeup
- G4sp4rCS — CVE-2026-42980 PoC repo
- MSRC — CVE-2026-42980
- OnlyFm252 diff report — ntoskrnl_exe-kb5101650
Attack Path
WMI integer underflow to controlled out-of-bounds write in the kernel output buffer - fix present but CFR-gated in both builds
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
1 public PoCUnverified third-party code
Public proof-of-concept repositories aggregated from PoC-in-GitHub. They are not reviewed and may be incomplete, non-functional, or malicious — inspect the code before running anything.
| Repository | Stars | Published | Description |
|---|---|---|---|
| G4sp4rCS/CVE-2026-42980-POC | 100 | 2026-07-07 | CVE-2026-42980 PUBLIC EXPLOIT + RESEARCH |
Detection Rules
Acknowledgments
Anonymous