CVE-2022-30136: Microsoft Windows Network File System V4 Remote Code Execution Vulnerability
A buffer overflow in Windows NFSv4 response handling allows an unauthenticated attacker to send a crafted RPC request with many operations, causing a size miscalculation and potentially executing arbitrary code as SYSTEM.
A remote code execution vulnerability exists in Windows Network File System. The vulnerability is due to improper handling of NFSv4 requests.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The server calculates the response buffer size without including the size of each opcode, so the buffer is too small by four bytes per operation.
Impact
Successful exploitation could result in arbitrary code execution in the context of SYSTEM; unsuccessful exploitation may crash the target system.
What the attacker needed
Target runs Windows with NFSv4 enabled; Attacker can send RPC calls to the target
The fix
Microsoft patched the vulnerability in June 2022; disabling NFSv4.1 is a mitigation but may cause loss of functionality, and the update should not be applied unless the fix for CVE-2022-26937 is installed.
How it was found
- Send an RPC call to the target server with the Program field set to 100003 (NFS), Procedure set to 1 (Compound), and Program Version set to 4 (NFS4).
- Include at least 19 operations in the NFS COMPOUND request to overflow past the buffer padding.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a bug in how Windows handles a file-sharing protocol called NFS. When the server prepares a reply, it forgets to count the space needed for each operation, so a request with many operations makes the reply overflow a buffer. An attacker who can reach the NFS service can send such a request and may run their own code with high privileges.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.