libssh2 SFTP Packet Processing Zero Byte Allocation Out-of-Bounds Read Vulnerability [CVE-2019-3858]

CVE Number – CVE-2019-3858

A vulnerability in the sftp_packet_read function of libssh2 could allow an unauthenticated, remote attacker to access sensitive information or cause a denial of service (DoS) condition on a targeted system.The vulnerability exists in the sftp_packet_read function, as defined in the sftp.c source code file of the affected software, and is due to the improper processing of partial SFTP packets that contain a zero value for the payload length by the affected software. An attacker could exploit this vulnerability by persuading a user to connect to an attacker-controlled Secure Shell (SSH) server, which would allow the attacker to send packets that submit malicious input to the targeted system. A successful exploit could result in a zero byte allocation and out-of-bounds read condition, allowing the attacker to access sensitive information or cause a DoS condition.libssh2 confirmed the vulnerability and released software updates.


  • To exploit this vulnerability, an attacker may use misleading language or instructions to persuade a user to connect to a malicious SSH server in addition to sending packets that submit malicious input to the system. These requirements may reduce the likelihood of a successful exploit.


  • Administrators are advised to apply the appropriate updates.Administrators are advised to allow only trusted users to have network accessAdministrators are advised to use an unprivileged account when browsing the Internet.Administrators are advised to monitor critical systems.Users are advised not to open email messages from suspicious or unrecognized sources. If users cannot verify that links or attachments included in email messages are safe, they are advised not to open them.Users are advised not to visit websites or follow links that have suspicious characteristics or cannot be verified as safe.

Vendor Announcements

  • libssh2 has released a security advisory at the following link: CVE-2019-3858

Fixed Software

  • libssh2 has released a software update at the following link: libssh2 1.8.1

Duncan Newell

Duncan is a technology professional with over 20 years experience of working in various IT roles. He has a interest in cyber security, and has a wide range of other skills in radio, electronics and telecommunications.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: