CVE-2018-3737 - Incorrect Regular Expression

Severity

50%

Complexity

99%

Confidentiality

48%

sshpk is vulnerable to ReDoS when parsing crafted invalid public keys.

sshpk is vulnerable to ReDoS when parsing crafted invalid public keys.

CVSS 3.0 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

CVSS 2.0 Base Score 5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:N/I:N/A:P).

Demo Examples

Incorrect Regular Expression

CWE-185

The following code takes phone numbers as input, and uses a regular expression to reject invalid phone numbers.


               
}
system("lookup-phone $phone");# looks like it only has hyphens and digits
error("malformed number!");

An attacker could provide an argument such as: "; ls -l ; echo 123-456" This would pass the check, since "123-456" is sufficient to match the "\d+-\d+" portion of the regular expression.

Overview

First reported 6 years ago

2018-06-07 02:29:00

Last updated 5 years ago

2019-10-09 23:40:00

Affected Software

Joyent sshpk 1.13.1 for Node.js

1.13.1
node.js

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.