CVE-2026-81405: Nmap < 7.992 Memory Exhaustion via Unbounded ONC-RPC Fragment Length in rpc.lua
Nmap before 7.992 contains an uncontrolled resource consumption vulnerability in the Comm.ReceivePacket function of the NSE rpc.lua library, which buffers ONC-RPC record fragments using the server-declared fragment length without an upper bound. A malicious RPC service on a scanned host can declare fragments of up to roughly 2.1GB, and up to 400 fragments per call, causing the Nmap process to exhaust memory; the read path is reached by rpcinfo.nse during version detection (-sV) and is shared by the NFS, rusers and NetWorker scripts.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.992
Event History
Frequently Asked Questions
Which scans are exposed to this issue?
The vulnerable receive path is reached by rpcinfo.nse during service/version detection with -sV. It is also shared by the NFS, rusers, and NetWorker NSE scripts.
What must an attacker control to trigger the memory exhaustion?
An attacker needs to operate or control a malicious RPC service on a host being scanned. The service can advertise oversized ONC-RPC record fragment lengths, causing Nmap to buffer server-declared data without an upper bound.
Are unauthenticated scans affected?
Yes. The listed vector has no required privileges, but exploitation requires user interaction in the form of scanning the malicious RPC service.
What is the practical impact on the scanner?
A malicious service can declare fragments of roughly 2.1 GB each, with up to 400 fragments per call. This can exhaust memory in the Nmap process and disrupt or terminate the scan.