Skip to main content

Nmap CVE-2026-81407

| EUVDEUVD-2026-135601 MEDIUM
Use of Hard-coded Cryptographic Key (CWE-321)
2026-11-25 VulnCheck GHSA-m3cm-27jc-3hvj
6.0
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Position to observe network traffic
  2. Delivery
    Capture AFP DHX authentication exchange
  3. Exploit
    Compute shared secret from hardcoded exponent
  4. Execution
    Decrypt operator-supplied AFP password
  5. Impact
    Reuse recovered AFP credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Key management, no hard-coded keys
Exploitation Conditions

Exploitation requires three specific conditions to coincide: (1) an Nmap operator runs an AFP NSE script that performs DHCAST128/DHX login - specifically afp-showmount.nse or afp-brute.nse - and supplies credentials via the afp.username and afp.password arguments against an Apple Filing Protocol server; (2) the attacker can passively observe the network traffic of that authentication exchange; and (3) the vulnerable Nmap version is before 7.992. No man-in-the-middle position, no cryptanalysis, and no privileges on either host are needed, because the fixed Diffie-Hellman private exponent is hardcoded and public, so capturing the server's public value is sufficient to derive the shared secret and decrypt the password. Limiting factors that reduce real-world exposure: the victim must actually use credentialed AFP scanning (passive user involvement, UI:P), the attacker must be able to see that particular traffic (AT:P), only the confidentiality of the supplied AFP credentials is at stake (no integrity or availability impact), and only Nmap versions prior to 7.992 are affected.

Impact

This is a genuine but bounded issue rather than a top-tier emergency. The CVSS 4.0 vector scores 6.0 (medium): AV:N/AC:L/PR:N give it an easy, unauthenticated outer surface, but AT:P (the attacker must already be positioned to observe the Nmap-to-server traffic) and UI:P (an operator must run a credentialed AFP script) are the real governors, and impact is confidentiality-only (VC:H, VI:N, VA:N, no scope change). The vuln.today decision label is 'this_month' - a routine, non-emergency priority - which is consistent with the absence of a CISA KEV listing (no confirmed active exploitation) and with no EPSS score being supplied. No public exploit is identified in the provided data, though the description notes the Diffie-Hellman private exponent is 'publicly known' and the patch diff exposes the exact hardcoded value, so the hard part of exploitation is effectively free: once traffic is captured the password recovery is deterministic, requiring no MITM and no cryptanalysis. The signals are therefore internally consistent - medium CVSS, no KEV, monthly decision label all agree. The main limiting factor is applicability: this only bites operators who actually run AFP authentication scripts (afp-brute.nse, afp-showmount.nse) with credentials and only where an attacker can passively watch that specific exchange, so it is opportunistic credential leakage rather than a mass-exploitable flaw. Missing data worth noting explicitly: no EPSS probability and no KEV status were provided, so widespread-exploitation likelihood cannot be quantified from the input.

Exploit ScenarioDerived

An attacker passively sniffing a network segment captures the AFP (DHX/DHCAST128) authentication exchange produced when an administrator runs afp-brute.nse or afp-showmount.nse with afp.username and afp.password set. Because Nmap uses a fixed, publicly known Diffie-Hellman private exponent, the attacker computes the shared secret from the server's public value and the hardcoded exponent and decrypts the operator-supplied AFP password offline - no man-in-the-middle and no cryptanalysis needed. No published proof-of-concept is present in the provided data, but the exponent is public in Nmap's source, making the decryption trivial for anyone with the captured packets.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 25, 2026

Passive network observers can recover Apple Filing Protocol (AFP) login credentials exchanged by Nmap's NSE AFP scripts because Nmap before 7.992 hardcodes a publicly known 256-bit Diffie-Hellman private exponent in the DHCAST128 login routine of nselib/afp.lua. An attacker who simply watches traffic between a scanning Nmap host and an AFP server - no man-in-the-middle position and no cryptanalysis required - can combine that fixed exponent with the server's public value to derive the shared secret and decrypt the password passed via afp.username and afp.password, as used by afp-showmount.nse and afp-brute.nse. Impact is limited to confidentiality of those supplied AFP credentials: an operator must actually run a credentialed AFP scan against a server while the traffic is observable, and only versions prior to 7.992 are affected. No public exploit code was identified at time of analysis and the issue is not in CISA KEV; the vendor has released a fixed version.

RemediationAI

Vendor-released patch: upgrade to Nmap 7.992 or later, which replaces the hardcoded DH private exponent with a randomly generated 256-bit value (openssl.bignum_rand(256)) in nselib/afp.lua; upgrade details are in the changelog at https://nmap.org/changelog.html and the fix commits f4d4df911ae8b11a5b8855fd6350a853f1f6cded and c7b9546bb83bf4d48b3103f05c411cac7951f9e8. Per the vendor advisory, updating is the complete fix, since the weakness is baked into the client-side key generation rather than being configurable. Until upgrading, the practical mitigation is procedural: avoid running afp-showmount.nse or afp-brute.nse with afp.username and afp.password over any network segment where the traffic can be passively observed, and use dedicated, low-value AFP credentials for scanning so that any recovered password has minimal blast radius - the trade-off is reduced scanning coverage or the operational burden of managing throwaway accounts. Patching should be scheduled within the current monthly maintenance window rather than treated as an emergency, given the bounded confidentiality-only impact and the requirement for passive visibility of a credentialed AFP scan.

Affected VersionsENISA

nmap 0 <7.992

Affected Packages

euvd nmap fix: 7.992

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

AFP's DHCAST128 (DHX) authentication performs an unauthenticated Diffie-Hellman exchange before the password is sent, and its security rests entirely on the client's private exponent remaining secret. Nmap's nselib/afp.lua generated the client value Ra from a hardcoded hex constant (86F6D3C0B0D63E4B11F113A2F9F19E3BBBF803F28D30087A1450536BE979FD42) instead of a random value, which is CWE-321 (Use of Hard-coded Cryptographic Key). Because that exponent is fixed and public, the exchange degenerates into an obfuscation rather than a key agreement: anyone who captures the server's public value can compute the same shared secret and decrypt the credential payload, without needing to intercept, modify or re-route packets. The upstream fix in the referenced commits replaces the constant with openssl.bignum_rand(256), restoring per-session randomness. Note that the CVSS v4.0 vector supplied (AT:P, UI:P, PR:N) and the independent assessment (CVSS 3.1 AV:N/AC:L/PR:N/UI:R) both describe this as requiring a specific attack condition - the victim must be conducting credentialed AFP scanning that the observer can see - not a default-exposed remote compromise; there is no integrity or availability impact, and the trigger is the operator's decision to run an authenticated AFP NSE script against a reachable server.

Know when Nmap gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.0 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

A passive observer recovers credentials using the public hardcoded DH exponent with no privileges or MITM (PR:N, AC:L), but a victim must run a credentialed AFP script (UI:R), and only confidentiality is affected.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 66% exploitable
Prevalence
High
Nmap is a near-universal network scanning tool, though AFP credentialed scanning is niche
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Nmap

View all
CVE-2013-4885 MEDIUM POC
6.8 Oct 26

The http-domino-enum-passwords.nse script in NMap before 6.40, when domino-enum-passwords.idpath is set, allows remote s

CVE-2019-11490 HIGH POC
7.8 Apr 24

An issue was discovered in Npcap 0.992. Rated high severity (CVSS 7.8), this vulnerability is low attack complexity. Pub

CVE-2018-15173 HIGH POC
7.5 Aug 08

Nmap through 7.70, when the -sV option is used, allows remote attackers to cause a denial of service (stack consumption

CVE-2026-58058 MEDIUM POC
6.9 Jun 28

Out-of-bounds reads and a process crash in Nmap through 7.99 can be triggered remotely by any host that is being scanned

CVE-2026-137978 HIGH
7.7 Nov 27

A use-after-free in Nmap's parallel DNS resolver (DNS::ResolverImpl::process_request in libnetutil/massdns.cc) affects N

CVE-2026-137977 HIGH
7.7 Nov 27

Use-after-free in Nmap's parallel DNS resolver (libnetutil/massdns.cc) in all versions before 7.992 allows an attacker w

CVE-2026-81406 HIGH
7.1 Nov 25

Memory exhaustion in Nmap's db2-das-info NSE script lets a malicious or spoofed DB2 Administration Server on a scanned h

CVE-2026-81405 HIGH
7.1 Nov 25

Memory exhaustion in the Nmap Scripting Engine's rpc.lua library (Nmap before 7.992) lets a malicious ONC-RPC service on

CVE-2026-81408 HIGH
7.1 Nov 25

Memory exhaustion in Nmap's NSE scripting engine (versions before 7.992) lets a hostile DRDA service consume unbounded m

CVE-2026-81412 HIGH
7.1 Nov 25

Memory exhaustion and prolonged CPU spin in Nmap's NSE MSRPC library (nselib/msrpctypes.lua) affects Nmap releases befor

CVE-2026-81411 HIGH
7.1 Nov 25

A malformed RDP handshake response can hang the Nmap scanner process at 100% CPU indefinitely, because the rdp.lua NSE l

CVE-2026-81415 MEDIUM
6.0 Nov 25

Nmap releases before 7.992 can be driven into a permanent 100% CPU hang while running the NSE script tn3270-screen.nse (

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy