Denial of Service Vulnerability in Nmap: CVE-2017-18594

nmap Updated 02 Oct 2025

Summary

29/08/2019
N/A
Yes i
High
7.5

ALPINE-CVE-2017-18594: nse_libssh2.cc in Nmap 7.70 is subject to a denial of service condition due to a double free when an SSH connection fails, as demonstrated by a leading \n character to ssh-brute.nse or ssh-auth-methods.nse. Affects nmap versions < 7.70-r4. Fixed in 7.70-r4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Nmap is a widely used open-source network scanning tool that allows users to discover hosts and services on a computer network. It is known for its versatility, supporting a variety of scanning techniques and offering extensive features for network exploration and security auditing. However, Nmap is susceptible to a specific vulnerability that can lead to a denial of service condition.

Vulnerability Detail

The vulnerability, identified as CVE-2017-18594, originates from a flaw in the nse_libssh2.cc file within Nmap version 7.70. It is caused by a double free error that occurs when an SSH connection fails, particularly when a leading newline character is present in scripts like ssh-brute.nse or ssh-auth-methods.nse. This flaw can lead to unexpected behavior, potentially crashing the application and disrupting network scanning operations.

How To Fix

Minimum fixed version

7.70-r4

This is the first release that contains the fix.

sudo apk add --upgrade nmap

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using the affected scripts (ssh-brute.nse and ssh-auth-methods.nse) until the package is updated to a secure version. This can help mitigate the risk of triggering the vulnerability while a permanent fix is being implemented.

Conclusion

CVE-2017-18594 represents a significant vulnerability in Nmap that can lead to denial of service conditions. Users are advised to update their Nmap installations to the latest patched versions to mitigate the risk. Additionally, temporary workarounds can be employed until the updates are applied.

See every vulnerability recorded for nmap →

Share this vulnerability

FAQ

CVE-2017-18594 is a vulnerability in Nmap that can lead to a denial of service due to a double free error when an SSH connection fails.

This vulnerability can cause Nmap to crash, disrupting network scanning operations and potentially affecting network security assessments.

Nmap versions prior to 7.70-r4 for Alpine v3.10 and prior to 7.80-r0 for Alpine v3.11 and later are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score of CVE-2017-18594 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for nmap.

How To Fix

Minimum fixed version

7.70-r4

This is the first release that contains the fix.

sudo apk add --upgrade nmap

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback