Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-31956: Windows NTFS Extended Attributes Buffer Overflow Privilege Escalation

Published Jun 8, 2021 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.8High · v3.1
EPSS22.3%98th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2021-31956CWE-191 · Integer Underflow (Wrap or…

CVE-2021-31956 is a heap-based buffer overflow in the Windows NTFS kernel driver's NtfsQueryEaUserEaList function. Improper handling of integer underflow during extended-attribute output-buffer length checks permits corruption of paged-pool memory. Exploits combine this corruption with Windows Notification Facility objects to obtain arbitrary kernel-memory read and write capabilities and elevate a process to SYSTEM privileges. The vulnerability was exploited as a zero-day in PuzzleMaker attacks and subsequently incorporated into the Magnitude exploit kit.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation enables local privilege escalation to SYSTEM and arbitrary kernel-memory access. In observed browser exploit chains, it enabled escape from the Chrome sandbox after an initial browser compromise. SYSTEM token theft permits attacker-controlled processes to operate with elevated privileges; observed chains used the resulting access for malware execution, including Magniber ransomware deployment.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by limiting opportunities for local code execution and sandboxed code execution on affected hosts. Prioritize hardening of browsers and other applications that process untrusted content, restrict user ability to open untrusted files, minimize local administrative and interactive access, and use endpoint controls capable of detecting kernel exploitation behavior and anomalous privilege escalation. These measures do not eliminate the flaw but can reduce the likelihood of successful exploitation until patches are deployed.

Remediation

Patch, then assume compromise.

Apply the applicable Microsoft Windows security updates released on June 8, 2021, which patched CVE-2021-31956, or subsequent cumulative updates containing the fix.

Public exploits

Exploits

4 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
CVE-2021-31956This repository contains a local privilege escalation exploit for CVE-2021-31956, targeting Microsoft Windows 10 20H2. The main exploit logic is implemented in 'CVE-2021-31956.c', with supporting structures and definitions in 'CVE-2021-31956.h'. The exploit leverages a heap overflow in the Windows Notification Facility (WNF) to manipulate kernel memory and ultimately steal the SYSTEM process token, granting the attacker SYSTEM privileges. The exploit is operational and requires local execution on a vulnerable Windows system. The README notes that the user must specify a writable directory for file operations, and that the exploit will create a new console window. The repository includes Visual Studio project files for building the exploit. No network endpoints are involved; the attack vector is purely local. The exploit is not part of a framework and is a standalone proof-of-concept with a working privilege escalation payload.Y3A · Disclosed Sep 2, 2022 · c · localOperationalUAC-Elevation-CVEThis is a small Visual Studio C++ Windows console project consisting of an entry point (Entry.cpp), a method dispatcher and implementation (methods/methods.cpp/.h), and standard solution/project metadata. Method 1 implements the known fodhelper.exe UAC-bypass pattern: it creates the current-user ms-settings shell open command registry key, sets its default value to an operator-supplied executable path, creates an empty DelegateExecute value, and starts fodhelper.exe. It waits briefly and then attempts to delete the hijack artifacts. The default payload is calc.exe, but the executable path is accepted from the command line. If the user is already an administrator, the program bypasses the registry method and directly starts the supplied file using ShellExecuteExA. No network communication, remote endpoint, persistence mechanism, or embedded shellcode is present. Although the README associates the project with CVE-2021-31956 and asserts SYSTEM-level execution, the source specifically implements a local fodhelper registry hijack and does not contain logic to obtain or verify SYSTEM privileges. The project is an operational local privilege-escalation/UAC-bypass proof of concept with a basic customizable command payload.DaoshuReal · Disclosed May 7, 2025 · cpp · localOperationalCVE-2020-6418This repository is a real exploit chain combining a browser RCE with a Windows local privilege escalation. It is not just a PoC snippet: it contains a working browser stage, native shellcode, a standalone Windows EoP binary, build scripts, prebuilt artifacts, and notes documenting an abandoned delivery approach. Structure: the root README explains the full chain and operator workflow. browser-exploit/ contains the Chrome CVE-2020-6418 exploit as a static HTML/JavaScript file plus a Python builder that embeds shellcode into the page. browser-exploit/shellcode/ contains x64 assembly stubs and a C harness for testing shellcode outside the browser. privilege-escalation/ contains a large standalone C exploit for Windows 10 20H1 build 19041.264. notes/ contains earlier unused stubs and a test harness for a failed approach that tried to push the full PE through the V8 arbitrary write primitive. prebuilt/ contains ready-made exploit.html and references to exploit.exe. Main capability: exploit_template.html abuses CVE-2020-6418 in V8 Turbofan to corrupt a Float64Array length, build relative and absolute read/write primitives, locate a WebAssembly RWX page, and overwrite it with native shellcode. The shellcode is not a full payload; it is a downloader/launcher stub. That stub manually resolves Windows APIs by walking the PEB and PE export tables, loads urlmon.dll, calls URLDownloadToFileA to fetch a second-stage executable from an attacker-controlled HTTP server, saves it to disk, and launches it with WinExec. Second stage: privilege-escalation/exploit.c is a standalone local privilege escalation tool targeting Windows 10 20H1 build 19041.264 x64. According to the code and documentation, it first recovers the kernel base using a PREFETCH+RDTSCP timing side channel, then abuses a missing length check in NtPowerInformation BootStat integrity handling to gain a write-{0,1} primitive against an arbitrary kernel address, specifically to disable ExIsRestrictedCaller protections by modifying SepMediumDaclSd-related state. It then uses CVE-2021-31956 in ntfs.sys Extended Attribute handling to establish a stable arbitrary kernel read/write primitive via named pipe attributes. With that primitive, it locates SYSTEM’s token and copies it into the current process, then spawns a SYSTEM shell and attempts cleanup/repair of kernel state. Operational notes: the exploit is highly version-specific and depends on hardcoded offsets in both the browser and kernel stages. It requires Chrome 80.0.3987.87 x64, Windows 10 19041.264 x64, and Chrome launched with --no-sandbox. The default second-stage URL is hardcoded as http://192.168.37.1:8000/exploit.exe, and the default drop path is C:\lab8\exploit.exe. The repository’s prebuilt exploit.html embeds that same network configuration. Overall maturity is OPERATIONAL: the payload is functional and complete, but configuration is largely hardcoded rather than framework-driven.a-mansilla · Disclosed Aug 16, 2026 · markdown · python · browser · web · localOperationalCVE-2021-31956-POCThis repository is a Proof-of-Concept (PoC) exploit for CVE-2021-31956, a Windows kernel (NTFS) local privilege escalation vulnerability. The code is written in C++ and structured as a Visual Studio project. The main exploit logic resides in '31956Custom/Main.cpp', which orchestrates the attack by: - Initializing access to undocumented NT* API functions from ntdll.dll. - Leaking the EPROCESS address of the current process using a technique related to CVE-2021-31955 (Superfetch/SysInfo leak). - Crafting a file ('TriggerBug') with specific NTFS extended attributes to trigger a heap overflow in the kernel. - Corrupting WNF (Windows Notification Facility) state data structures in kernel memory to gain arbitrary read/write capabilities. - Stealing the SYSTEM token from the SYSTEM process and assigning it to the current process, then spawning a SYSTEM shell (cmd.exe). The exploit is highly dependent on hardcoded kernel structure offsets, which may need adjustment for different Windows builds. The README notes that the exploit is a work-in-progress and may destabilize the system (potential for BSOD or instability after use). The code does not target remote or network endpoints; it is strictly a local privilege escalation exploit. The repository includes references to related research and prior PoCs for both CVE-2021-31956 and CVE-2021-31955.hoangprod · Disclosed Jun 5, 2023 · c++ · localPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationWindows 10operating_system
Microsoft CorporationWindows 10 1507operating_system
Microsoft CorporationWindows 10 1607operating_system
Microsoft CorporationWindows 10 1809operating_system
Microsoft CorporationWindows 10 1909operating_system
Microsoft CorporationWindows 10 2004operating_system
Microsoft CorporationWindows 10 20h2operating_system
Microsoft CorporationWindows 10 21h1operating_system
Microsoft CorporationWindows 7operating_system
Microsoft CorporationWindows 8.1operating_system
Microsoft CorporationWindows Rt 8.1operating_system
Microsoft CorporationWindows Server 2004operating_system
Microsoft CorporationWindows Server 2008operating_system
Microsoft CorporationWindows Server 2008 R2operating_system
Microsoft CorporationWindows Server 2008 Sp2operating_system
Microsoft CorporationWindows Server 2012operating_system
Microsoft CorporationWindows Server 2012 R2operating_system
Microsoft CorporationWindows Server 2016operating_system
Microsoft CorporationWindows Server 2019operating_system
Microsoft CorporationWindows Server 20h2operating_system
FAQ

Frequently asked questions

Is CVE-2021-31956 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2021-31956?
Yes. Mallory tracks 4 public exploits or proofs of concept for CVE-2021-31956, the earliest disclosed Sep 2, 2022.
Is there a patch for CVE-2021-31956?
Apply the applicable Microsoft Windows security updates released on June 8, 2021, which patched CVE-2021-31956, or subsequent cumulative updates containing the fix.
What products are affected by CVE-2021-31956?
Microsoft Corporation Windows 10, Microsoft Corporation Windows 10 1507, Microsoft Corporation Windows 10 1607, Microsoft Corporation Windows 10 1809, Microsoft Corporation Windows 10 1909, and at least 15 more.
How severe is CVE-2021-31956?
CVE-2021-31956 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 22.3% (98th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence3Every report linking this CVE to a named adversary.
Associated malware2Malware families linked to this CVE, with evidence and IOCs.
Detection signatures2YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.