ip-address is vulnerable to Regular Expression Denial of Service (ReDoS)
63
CVE Score
Medium
Regular Expression Denial of Service (ReDoS)
Address6's constructor and Address6.isValid() strip an IPv6 zone identifier with the unanchored regex /%.*$/ before checking the address length. A string holding many % characters followed by a line terminator makes the regex retry from every %, each attempt scanning to the terminator before failing, so rejecting the input takes time proportional to the square of its length. An application that validates externally supplied strings with these methods can be stalled by a single long request even though the input is ultimately rejected. The fix replaces the regex scan with an index-based search, making zone extraction linear time.
Upgrade the ip-address library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
3.2.0 - 10.7.3
Fixed in 10.7.4ip-address is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 3.2.0 - 10.7.3.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.