CVE-2026-81407 in Nmapinfo

Summary

by MITRE • 11/25/2026

Nmap before 7.992 contains a hardcoded cryptographic key vulnerability in the DHCAST128 login of the NSE afp.lua library, which uses a fixed, publicly known Diffie-Hellman private exponent. A passive observer of the network traffic between Nmap and an Apple Filing Protocol server can compute the shared secret from the hardcoded exponent and the server's public value and decrypt the password supplied to scripts such as afp-showmount.nse and afp-brute.nse through the afp.username and afp.password arguments, without man-in-the-middle access or cryptanalysis.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability identified in Nmap versions prior to 7.992 represents a critical failure in cryptographic implementation within the Network Scripting Engine library for Apple Filing Protocol authentication. Specifically, the flaw resides in the DHCAST128 login mechanism utilized by scripts such as afp-showmount.nse and afp-brute.nse. The core technical defect is the use of a hardcoded Diffie-Hellman private exponent that remains constant across all instances of the library. In standard secure implementations, the Diffie-Hellman key exchange protocol requires each party to generate unique, random ephemeral keys for every session to ensure forward secrecy and prevent pre-computation attacks. By hardcoding this private value, Nmap effectively eliminates the randomness essential to the security model, transforming a dynamic cryptographic handshake into a static configuration that can be trivially reversed by any adversary with network visibility.

From an operational perspective, this flaw allows passive observers on the same network segment to compromise sensitive authentication credentials without requiring active interception or man-in-the-middle capabilities. An attacker monitoring traffic between Nmap and an Apple Filing Protocol server can capture the public value exchanged during the handshake. Because the private exponent used by Nmap is publicly known due to its hardcoded nature, the attacker can compute the shared secret key directly from this captured data. Once the shared secret is derived, it serves as the decryption key for the CAST128 cipher stream protecting the authentication payload. Consequently, any username and password supplied via afp.username or afp.password arguments are exposed in plaintext to anyone capable of packet capture on that network segment. This undermines the confidentiality guarantees expected from encrypted protocols and exposes organizational credentials to unauthorized access.

This vulnerability aligns with CWE-321, which describes the use of a hard-coded cryptographic key, as well as CWE-798, concerning the use of hardcoded credentials. The attack vector is classified under MITRE ATT&CK technique T1040, Network Sniffing, where adversaries passively monitor network traffic to gather sensitive information. Furthermore, it relates to T1552.003, Unsecured Credentials, as the exposure occurs due to improper protection of credentials in transit resulting from flawed cryptographic implementation rather than storage issues. The impact is severe because it allows for credential harvesting without triggering many intrusion detection systems that focus on active exploitation or anomalous traffic patterns, relying instead on simple packet analysis tools like Wireshark.

Mitigation strategies must prioritize immediate software updates to resolve the underlying code defect. Organizations running Nmap should upgrade to version 7.992 or later, where this hardcoded exponent has been replaced with a properly generated ephemeral key exchange mechanism. In environments where upgrading is not immediately feasible, network segmentation and encryption of administrative traffic can provide partial mitigation by limiting passive access to the relevant network segments. Additionally, security teams should audit existing Nmap scripts for similar patterns of static cryptographic parameters and enforce strict code review processes that validate random number generation in all authentication modules. Regular vulnerability scanning against known CVEs is essential to maintain visibility into such implementation flaws before they can be exploited in production environments.

Responsible

VulnCheck

Reservation

08/26/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00484

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!