CVE-2015-1782: Input Validation

Published Mar 6, 2015
·
Updated

The following issue was reported as affecting libssh2:

When negotiating a new SSH session with a remote server, one of libssh2's functions for doing the key exchange (kexagreemethods) was naively reading data from the incoming packet and using it without doing sufficient range checks. The SSHMSGKEXINIT packet arrives to libssh2 with a set of strings, sent as a series of LENGTH + DATA pairs. libssh2 would go through the list and read the LENGTH field, read the string following the LENGTH and then advance the pointer LENGTH bytes in memory and expect to find the next LENGTH + DATA pair there. Then move on until seven subsequent strings are taken care of. It would naively assume that the (unsigned 32 bit) LENGTH fields were fine.

This packet arrives in the negotiating phase so the remote server has not yet been deemed to be a known or trusted party.

A malicious attacker could man in the middle a real server and cause libssh2 using clients to crash (denial of service) or otherwise read and use completely unintended memory areas in this process.

There are no known exploits of this flaw at this time.

Other sources

The kexagreemethods function in libssh2 before 1.5.0 allows remote servers to cause a denial of service (crash) or have other unspecified impact via crafted length values in an SSHMSGKEXINIT packet.

Affected Software

5 affected components
Debian Debian Linux=7.0
libssh2 libssh2<=1.4.3
Fedoraproject Fedora=20
Fedoraproject Fedora=21
Fedoraproject Fedora=22

Event History

Mar 6, 2015
Data Sourced
via Red Hat·02:27 PM
DescriptionSeverityAffected Software
Mar 13, 2015
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
Description
Data Sourced
02:59 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2015-1782?

CVE-2015-1782 has a severity rating of medium due to the potential denial of service it can cause.

2

How do I fix CVE-2015-1782?

To fix CVE-2015-1782, update libssh2 to version 1.5.0 or higher, or apply the relevant patches from your vendor.

3

What impact does CVE-2015-1782 have on affected systems?

CVE-2015-1782 can cause a denial of service by crashing the application when receiving specially crafted SSH_MSG_KEXINIT packets.

4

Which versions of libssh2 are affected by CVE-2015-1782?

CVE-2015-1782 affects libssh2 versions up to and including 1.4.3.

5

What systems are vulnerable to CVE-2015-1782?

Vulnerable systems include Debian 7.0 and Fedora versions 20, 21, and 22 that utilize affected versions of libssh2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203