Windows Kernel Local Privilege Escalation via SeDebugPrivilege Bit Corruption (CVE-2026-40369)
by CCELEND · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-40369
- Category
- binary
- Affected product
- Windows kernel (ntoskrnl.exe)
- Affected versions
- Windows builds vulnerable to the underlying kernel information-disclosure/corruption primitive exploited here (specific build range not stated in source)
- Disclosed
- 2026-07-05
- Patch status
- unpatched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-06 |
| Author / Researcher | CCELEND |
| CVE / Advisory | CVE-2026-40369 |
| Category | binary |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | windows, kernel, lpe, privilege-escalation, token-stealing, sedebugprivilege, ntoskrnl, local |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Windows kernel (ntoskrnl.exe) |
| Versions Affected | Windows builds vulnerable to the underlying kernel information-disclosure/corruption primitive exploited here (specific build range not stated in source) |
| Language / Platform | C++ (Win32/NT native API), compiled as a Windows executable |
| Authentication Required | Local-only (requires an existing low-privilege local session) |
| Network Access Required | No |
Summary
This exploit is a local privilege escalation chain against the Windows kernel that abuses a low-level primitive reachable through NtQuerySystemInformation to corrupt a bit near the process’s SeDebugPrivilege state in kernel memory, without requiring the attacker to already hold elevated rights. Once the debug privilege has effectively been granted, the tool locates the kernel object address of winlogon.exe’s token/thread structures, opens a handle to the winlogon.exe process with PROCESS_CREATE_PROCESS rights, and spawns a new cmd.exe process inherited from that SYSTEM-level process — resulting in a SYSTEM command shell for the original low-privilege caller. The PoC requires the operator to manually supply the running system’s ntoskrnl.exe kernel base address (leaked separately, e.g. via a known info-leak or debug interface) before the offset calculations and corruption primitive can be used.
Vulnerability Details
Root Cause
A kernel memory corruption/confusion primitive reachable through the NtQuerySystemInformation system call (invoked here with the SystemHandleCountInformation class against a crafted, attacker-influenced address derived from the resolved SeDebugPrivilege offset) allows an unprivileged caller to flip privilege-related state without proper access checks.
Attack Vector
- Attacker resolves the running kernel’s base address (
ntoskrnl.exeload address) and supplies it to the exploit. - The exploit locates
SeDebugPrivilege- and token-related offsets by parsing the on-diskntoskrnl.exeimage loaded into the process (viaGetModuleByName/offset-finder helpers). - The exploit repeatedly invokes
NtQuerySystemInformationwithSystemHandleCountInformationagainst an address derived fromSeDebugPrivilegeAddr - 1, corrupting adjacent privilege state in the current process’s kernel object. - With
SeDebugPrivilege-equivalent access effectively obtained, the tool openswinlogon.exe(a SYSTEM-level process) withPROCESS_CREATE_PROCESSaccess. - The exploit uses the
winlogon.exeprocess handle to spawn a newcmd.exeprocess that inherits SYSTEM-level context, giving the attacker a privileged command shell.
Impact
Local privilege escalation from a standard user to SYSTEM on affected Windows builds, via a self-contained native executable requiring only local code execution.
Environment / Lab Setup
Target: Windows host with a vulnerable ntoskrnl.exe build; low-privilege local user session
Attacker: Visual Studio / MSVC toolchain (Windows SDK, ntdll.lib) to build exp.cpp + exp_tools.cpp
Proof of Concept
PoC Script
See
exp.cpp(entry point) andexp_tools.cpp/exp_tools.h(offset-finding and privilege/token helper routines) in this folder.
| |
The program first prints the local OS version, prompts the operator for the kernel base address, computes the SeDebugPrivilege and token offsets from the loaded ntoskrnl.exe image, then loops corrupting kernel state via NtQuerySystemInformation while attempting to spawn a cmd.exe from winlogon.exe’s context until it succeeds, yielding an elevated shell.
Detection & Indicators of Compromise
Signs of compromise:
- Unexpected
cmd.exeprocesses with a parent process ID pointing towinlogon.exe - A low-integrity or standard-user process suddenly holding
SeDebugPrivilegewithout a corresponding administrative action - Anomalous, high-frequency
NtQuerySystemInformationcalls from user processes shortly before a privilege change
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 for CVE-2026-40369 — monitor Microsoft’s security advisories for a fix to the underlying kernel primitive |
| Interim mitigation | Apply available Windows updates promptly, restrict local logon/code-execution rights on sensitive hosts, and deploy kernel-mode exploit mitigation/EDR tooling that flags anomalous NtQuerySystemInformation usage and unexpected winlogon.exe-spawned processes |
References
Notes
Mirrored from https://github.com/CCELEND/CVE-2026-40369 on 2026-07-05.
| |