CVE-2019-3859
📋 TL;DR
This vulnerability in libssh2 allows a compromised SSH server to trigger an out-of-bounds read in client software, potentially causing denial of service or memory disclosure. It affects SSH clients using libssh2 versions before 1.8.1. Both server administrators and client users are impacted since exploitation requires a malicious server.
💻 Affected Systems
- libssh2
- applications using libssh2 library
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Leap by Opensuse
Leap by Opensuse
Libssh2 by Libssh2
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete client compromise and data exfiltration.
Likely Case
Denial of service (client crash) or limited memory disclosure.
If Mitigated
No impact if patched or using unaffected versions.
🎯 Exploit Status
Exploitation requires client to connect to malicious server; no authentication needed on client side.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.8.1 and later
Vendor Advisory: https://www.libssh2.org/
Restart Required: Yes
Instructions:
1. Update libssh2 package to version 1.8.1 or later using system package manager. 2. Rebuild any statically linked applications. 3. Restart affected services or applications.
🔧 Temporary Workarounds
Disable SSH client connections
allTemporarily disable SSH client functionality in affected applications
Use alternative SSH library
allSwitch to OpenSSH or other SSH implementations temporarily
🧯 If You Can't Patch
- Restrict SSH client connections to trusted servers only
- Implement network segmentation to limit exposure
🔍 How to Verify
Check if Vulnerable:
Check libssh2 version: `libssh2-config --version` or `ldconfig -p | grep libssh2`
Check Version:
libssh2-config --version || pkg-config --modversion libssh2
Verify Fix Applied:
Verify version is 1.8.1 or higher using same commands
📡 Detection & Monitoring
Log Indicators:
- Unexpected client crashes
- Memory access violation errors
Network Indicators:
- SSH connections to unknown/untrusted servers
SIEM Query:
source="ssh" AND (event_type="crash" OR error="segmentation fault")
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00102.html
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00103.html
- http://packetstormsecurity.com/files/152136/Slackware-Security-Advisory-libssh2-Updates.html
- http://www.openwall.com/lists/oss-security/2019/03/18/3
- http://www.securityfocus.com/bid/107485
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3859
- https://lists.debian.org/debian-lts-announce/2019/03/msg00032.html
- https://lists.debian.org/debian-lts-announce/2019/04/msg00006.html
- https://lists.debian.org/debian-lts-announce/2019/07/msg00024.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5DK6VO2CEUTAJFYIKWNZKEKYMYR3NO2O/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCWEA5ZCLKRDUK62QVVYMFWLWKOPX3LO/
- https://seclists.org/bugtraq/2019/Apr/25
- https://seclists.org/bugtraq/2019/Mar/25
- https://security.netapp.com/advisory/ntap-20190327-0005/
- https://www.broadcom.com/support/fibre-channel-networking/security-advisories/brocade-security-advisory-2019-767
- https://www.debian.org/security/2019/dsa-4431
- https://www.libssh2.org/CVE-2019-3859.html
- https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html
- http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00102.html
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00103.html
- http://packetstormsecurity.com/files/152136/Slackware-Security-Advisory-libssh2-Updates.html
- http://www.openwall.com/lists/oss-security/2019/03/18/3
- http://www.securityfocus.com/bid/107485
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3859
- https://lists.debian.org/debian-lts-announce/2019/03/msg00032.html
- https://lists.debian.org/debian-lts-announce/2019/04/msg00006.html
- https://lists.debian.org/debian-lts-announce/2019/07/msg00024.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5DK6VO2CEUTAJFYIKWNZKEKYMYR3NO2O/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCWEA5ZCLKRDUK62QVVYMFWLWKOPX3LO/
- https://seclists.org/bugtraq/2019/Apr/25
- https://seclists.org/bugtraq/2019/Mar/25
- https://security.netapp.com/advisory/ntap-20190327-0005/
- https://www.broadcom.com/support/fibre-channel-networking/security-advisories/brocade-security-advisory-2019-767
- https://www.debian.org/security/2019/dsa-4431
- https://www.libssh2.org/CVE-2019-3859.html
- https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html