CVE-2018-3737: Regular Expression Denial of Service in sshpk

sshpk Updated 02 Oct 2025

Summary

15/08/2018
Yes i
High
7.5

CVE-2018-3737: Regular Expression Denial of Service in sshpk. Affects sshpk versions < 1.13.2. Fixed in 1.13.2. How to fix ↓

Also tracked for

The same CVE-2018-3737 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The sshpk package is an npm package used for parsing and manipulating SSH public and private keys. It provides functionality for generating, validating, and working with SSH keys. The package is widely used in various applications that require SSH key management.

Vulnerability Detail

Versions of sshpk before 1.13.2 or 1.14.1 are vulnerable to regular expression denial of service (ReDoS) when parsing crafted invalid public keys. This vulnerability can be exploited by an attacker to cause a denial of service (DoS) by sending specially crafted invalid public keys to the application. The vulnerable code in sshpk fails to properly handle certain regular expressions, leading to excessive backtracking and causing the application to consume excessive CPU resources or crash. The impact of this vulnerability can range from service disruption to complete unavailability.

How To Fix

Minimum fixed version

1.13.2

This is the first release that contains the fix.

npm install sshpk@1.13.2

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

Workaround

There is no known workaround for this vulnerability. It is essential to update the sshpk package to a patched version to address the issue.

Conclusion

The sshpk package versions before 1.13.2 or 1.14.1 are vulnerable to regular expression denial of service (ReDoS). It is crucial to update the package to a patched version to mitigate the risk of a denial of service (DoS) attack. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for sshpk →

Share this vulnerability

FAQ

This vulnerability can lead to a denial of service (DoS) condition in applications that use the vulnerable sshpk package. It can result in service disruption or complete unavailability.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities using package-lock.json without requiring access to the code or installation.

There are no known public exploits for this vulnerability at the time of this report. However, it is crucial to update the sshpk package to a patched version to mitigate the risk.

No, updating the sshpk package to a patched version is the recommended solution. Manually fixing the vulnerability without updating the package may not address all the underlying issues and could leave the application exposed to potential attacks.

Related vulnerabilities

Recent vulnerabilities recorded for sshpk.

How To Fix

Minimum fixed version

1.13.2

This is the first release that contains the fix.

npm install sshpk@1.13.2

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