CVE-2021-27191: Denial of Service in get-ip-range
Summary
CVE-2021-27191: Denial of Service in get-ip-range. Affects get-ip-range versions < 4.0.0. Fixed in 4.0.0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The get-ip-range package is a Node.js module that provides functionality for working with IP ranges. It allows users to manipulate and extract information from IP ranges. This package is commonly used in Node.js applications that require IP range processing. However, versions prior to 4.0.0 are vulnerable to a denial of service (DoS) attack if untrusted input is provided as the range parameter. An attacker can exploit this vulnerability by sending a large range, such as 128.0.0.0/1, which can lead to resource exhaustion.
Vulnerability Detail
The vulnerability in get-ip-range arises from inadequate input validation. When an untrusted range is provided, the package fails to handle it properly, resulting in a DoS condition. An attacker can abuse this vulnerability to consume excessive resources, potentially leading to service disruption or unavailability. The severity of this vulnerability is rated as HIGH with a CVSS score of 7.5. It is crucial to update the get-ip-range dependency to version 4.0.0 or above to mitigate this vulnerability.
How To Fix
Minimum fixed version
4.0.0
This is the first release that contains the fix.
npm install get-ip-range@4.0.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The get-ip-range package for Node.js is vulnerable to a denial of service (DoS) attack if untrusted input is provided as the range parameter. This can lead to resource exhaustion and service disruption. It is highly recommended to update the get-ip-range dependency to version 4.0.0 or above to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for get-ip-range →
FAQ
This vulnerability can lead to a denial of service (DoS) condition, potentially causing service disruption or unavailability.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and the playground will analyze it for any open-source vulnerabilities, including this one.
Currently, there are no known workarounds for this vulnerability. It is recommended to update the get-ip-range dependency to the fixed version.
At the time of this report, there is no evidence of active exploits targeting this vulnerability. However, it is crucial to update the dependency to mitigate the risk.
This vulnerability was discovered and reported by the GitHub Security Lab.