CVE-2018-25282 Overview
CVE-2018-25282 is a denial of service vulnerability affecting Nmap version 7.70. The vulnerability allows local attackers to crash the application by processing malicious XML files containing exponential entity expansion. When an attacker creates a crafted XML file with nested entity definitions and opens it through ZenMap's scan import functionality, the program consumes excessive system resources and crashes.
This attack technique is commonly known as an "XML Bomb" or "Billion Laughs" attack, where recursively defined XML entities expand exponentially when parsed, overwhelming system memory and CPU resources.
Critical Impact
Local attackers can cause denial of service by importing malicious XML files through ZenMap, potentially disrupting security scanning operations and consuming system resources.
Affected Products
- Nmap 7.70
- ZenMap (GUI component of Nmap 7.70)
Discovery Timeline
- 2026-04-26 - CVE CVE-2018-25282 published to NVD
- 2026-04-27 - Last updated in NVD database
Technical Details for CVE-2018-25282
Vulnerability Analysis
This vulnerability is classified under CWE-674 (Uncontrolled Recursion), which occurs when software does not properly control the depth of recursion during entity expansion. The XML parser in ZenMap fails to limit entity expansion depth, allowing malicious XML files to trigger exponential memory consumption.
The attack requires local access and user interaction—specifically, an attacker must convince a user to import a specially crafted XML file through ZenMap's scan import feature. Once imported, the nested entity definitions expand recursively, rapidly consuming available system memory and CPU cycles until the application becomes unresponsive or crashes entirely.
While this vulnerability affects availability rather than confidentiality or integrity, it can significantly disrupt security operations that depend on Nmap/ZenMap for network reconnaissance and vulnerability scanning.
Root Cause
The root cause is improper handling of XML entity expansion in ZenMap's XML parsing functionality. The parser does not implement safeguards against recursive entity definitions, allowing attackers to craft XML documents where a single entity reference expands into billions of characters through nested references.
This is a classic XML parsing vulnerability where the absence of entity expansion limits permits resource exhaustion attacks. The XML parser processes all entity definitions without checking the total expansion size or depth of recursion.
Attack Vector
The attack vector is local, requiring the attacker to either have direct access to the target system or to socially engineer a user into importing a malicious XML file. The attack flow involves:
- An attacker crafts a malicious XML file containing nested entity definitions
- The attacker delivers this file to a victim (via email, file share, or physical media)
- The victim imports the XML file using ZenMap's scan import functionality
- The XML parser expands the nested entities exponentially
- System resources are exhausted, causing ZenMap to crash or become unresponsive
The malicious XML file typically contains entity definitions that reference other entities in a nested fashion. When the parser attempts to resolve these entities, each level of nesting causes exponential growth in the expanded content size. For detailed technical analysis and proof-of-concept examples, refer to the Exploit-DB #45357 entry.
Detection Methods for CVE-2018-25282
Indicators of Compromise
- Presence of XML files with excessive nested <!ENTITY> declarations in import directories
- ZenMap process consuming abnormally high memory (gigabytes) or CPU resources
- Unexpected ZenMap crashes when importing XML scan results
- System-wide resource exhaustion symptoms coinciding with ZenMap operations
Detection Strategies
- Monitor ZenMap processes for unusual memory consumption patterns exceeding normal operational baselines
- Implement file integrity monitoring on directories used for scan result imports
- Configure endpoint detection rules to alert on rapid memory consumption by Nmap-related processes
- Scan incoming XML files for suspicious entity expansion patterns before import
Monitoring Recommendations
- Enable process monitoring to track memory usage of ZenMap and related Nmap processes
- Configure system alerts for memory exhaustion conditions tied to specific applications
- Review imported XML files using static analysis tools that detect entity expansion attacks
- Implement SentinelOne Singularity platform to detect anomalous resource consumption patterns indicative of DoS attacks
How to Mitigate CVE-2018-25282
Immediate Actions Required
- Upgrade Nmap to a version newer than 7.70 that includes XML parsing protections
- Avoid importing XML scan results from untrusted or unknown sources
- Implement organizational policies restricting XML file imports to verified sources only
- Consider using command-line Nmap with output formats other than XML when processing untrusted data
Patch Information
Users should upgrade to a more recent version of Nmap that addresses this XML parsing vulnerability. The vulnerable version 7.70 can be identified via the Nmap Installer. For additional security guidance, consult the VulnCheck Advisory on Nmap DoS.
Workarounds
- Disable or restrict access to ZenMap's XML import functionality in high-security environments
- Use command-line Nmap with -oN (normal output) or -oG (grepable output) instead of XML output formats
- Pre-validate XML files with security tools that detect entity expansion attacks before importing
- Run ZenMap in a sandboxed environment with strict resource limits to contain potential DoS impacts
Organizations using SentinelOne can leverage the Singularity platform's behavioral AI to detect and respond to resource exhaustion attacks, providing an additional layer of defense against exploitation of this vulnerability.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


