Integer overflow in libssh2

Published: 2019-10-22 | Updated: 2019-11-07
Severity High
Patch available NO
Number of vulnerabilities 1
CVE ID CVE-2019-17498
CWE ID CWE-190
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software libssh2 Subscribe
Vendor libssh2.org

Security Advisory

This security advisory describes one high risk vulnerability.

1) Integer overflow

Severity: High

CVSSv3: 7.7 [CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H/E:P/RL:U/RC:C] [PCI]

CVE-ID: CVE-2019-17498

CWE-ID: CWE-190 - Integer Overflow or Wraparound

Description

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack or access sensitive information.

The vulnerability exists due to integer overflow in the "SSH_MSG_DISCONNECT" logic in "packet.c" in a bounds check. A remote attacker can specify an arbitrary (out-of-bounds) offset for a subsequent memory read, trigger out-of-bounds read, disclose sensitive information or cause a denial of service condition on the target system when a user connects to the malicious SSH server.


Mitigation

Cybersecurity Help is currently unaware of any official solution to address this vulnerability.

Vulnerable software versions

libssh2: 0.1, 0.3, 0.5, 0.6, 0.7, 0.8, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 1.0, 1.1, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0

CPE External links

https://blog.semmle.com/libssh2-integer-overflow-CVE-2019-17498/
https://github.com/kevinbackhouse/SecurityExploits/tree/8cbdbbe6363510f7d9ceec685373da12e6fc752d/libssh2/out_of_bounds_read_disconnect_CVE-2019-17498
https://github.com/libssh2/libssh2/blob/42d37aa63129a1b2644bf6495198923534322d64/src/packet.c#L480
https://github.com/libssh2/libssh2/pull/402/commits/1c6fa92b77e34d089493fe6d3e2c6c8775858b94
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TY7EEE34RFKCTXTMBQQWWSLXZWSCXNDB/

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.