Security Advisory

CVE-2019-3855: libssh2 Client Out-of-Bounds Write

Last updated:
  • CVE-2019-3855

CVE-2019-3855 is an integer overflow in libssh2 before 1.8.1 that lets a malicious SSH server trigger an out-of-bounds write in the client while it reads packets, possibly running code on the connecting device. NVD scores it 8.8; Siemens lists it for the S7-1500 CPU 1518 MFP firmware before V3.1.5.

Vulnerability summary

CVSS base score

8.8

High severity

EPSS score (FIRST)

9.3%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2019-3855 · Source: NVD

Affected components

ComponentCPEVersion range
libssh2cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:*up to and including 1.8.0 (fixed in 1.8.1, released 2019-03-18)
Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP (GNU/Linux subsystem)—V3.1.0 and later before V3.1.5 (update to V3.1.5 or later, per Siemens SSA-398330)

What does this mean for affected devices?

CVE-2019-3855 is an integer overflow leading to an out-of-bounds write (CWE-190, CWE-787) in libssh2's transport read code. The libssh2 advisory says "a malicious server could send a specially crafted packet which could result in an unchecked integer overflow", affecting all versions up to and including 1.8.0; libssh2 1.8.1, released on 2019-03-18, checks the packet length before processing the payload. NVD scores it 8.8 with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (NVD).

libssh2 is a client-only library, so the attacker is the server the device connects to: a backup target, a log collector, an update mirror, or anyone who can impersonate it on the path. Checking the host key narrows who the device talks to but does not remove this bug class, because packets are parsed during the key exchange. Our libssh and libssh2 vulnerabilities in embedded firmware guide explains how libssh2 usually arrives through libcurl's SFTP and SCP support and how to find its version in an image.

Siemens ProductCERT lists CVE-2019-3855 in SSA-398330, republished by CISA as ICSA-23-348-10, for the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP (including SIPLUS variants), firmware V3.1.0 and later before V3.1.5. Siemens' remediation is to update to V3.1.5 or a later version, and it notes the V3.1 line is no longer maintained.

The CVE is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13); FIRST EPSS gives it 0.093, the 95th percentile, in the 2026-11-15 dataset (CISA KEV, FIRST EPSS). It shipped with eight sibling CVEs (CVE-2019-3856 to CVE-2019-3863) in the same release, so a build below 1.8.1 normally carries all nine. Distributions backported the fixes: the Debian tracker shows 1.4.3-4.1+deb8u2 (DLA-1730-1) and 1.7.0-1+deb9u1 (DSA-4431-1).

For device makers the fix is libssh2 1.8.1 or later, or the distribution patches on an older tree; our memory corruption fix guide covers proving that a length check reached the shipped library. Limit which servers a device connects to and pin their host keys as defence in depth.

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • A malicious server can send a crafted packet causing an unchecked integer overflow and out-of-bounds write; all versions up to 1.8.0; fixed in 1.8.1 (2019-03-18). — libssh2 security advisory
  • NVD CVSS v3.1 8.8; CWE-190 and CWE-787; affected before 1.8.1. — NVD
  • SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP V3.1.0 to before V3.1.5 affected by CVE-2019-3855; update to V3.1.5 or later. — Siemens SSA-398330
  • CISA republished Siemens SSA-398330 as ICSA-23-348-10. — CISA ICS Advisory ICSA-23-348-10
  • Not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.09294 (95.5th percentile), dataset 2026-11-15, read 2026-11-16. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. libssh2 security advisory CVE-2019-3855
  3. Siemens SSA-398330
  4. CISA ICS Advisory ICSA-23-348-10
  5. Debian Security Tracker
  6. CISA KEV
  7. FIRST EPSS

Frequently asked questions

Who can exploit CVE-2019-3855 against a device?

The SSH server the device connects to. libssh2 is a client library, and the libssh2 advisory describes a malicious server sending a crafted packet, so a compromised or impersonated backup, log or update server is the attacker (per the libssh2 advisory).

Which Siemens product lists CVE-2019-3855?

Siemens SSA-398330 (CISA ICSA-23-348-10) lists the GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP, firmware V3.1.0 to before V3.1.5, with the fix being V3.1.5 or later (per Siemens ProductCERT).

Which libssh2 version fixes CVE-2019-3855?

libssh2 1.8.1, released on 2019-03-18, together with eight related CVEs. Debian also backported the fix to 1.4.3 and 1.7.0 packages, so check the patch list as well as the version (per libssh2 and the Debian Security Tracker).

Is CVE-2019-3855 known to be exploited?

It is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13); FIRST EPSS gives it 0.093, the 95th percentile, in its 2026-11-15 dataset (per CISA KEV and FIRST EPSS).