Integer Overflow Vulnerability in libssh2: Remote Code Execution Risk

libssh2 Updated 03 Oct 2025

Summary

21/03/2019
N/A
Yes i
High
7.5

UBUNTU-CVE-2019-3855: An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from the server. Affects libssh2 versions < 1.4.3-2ubuntu0.2+esm1. Fixed in 1.4.3-2ubuntu0.2+esm1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libssh2 is a widely used library that provides an API for implementing SSH2 (Secure Shell) protocol in applications. It enables secure file transfers and remote command execution over unsecured networks. The library is essential for developers who need to integrate SSH capabilities into their software. However, a critical vulnerability has been identified in libssh2 that could allow attackers to exploit the library's functionality, leading to severe security risks.

Vulnerability Detail

An integer overflow flaw was discovered in libssh2 versions prior to 1.8.1, specifically in the way packets are read from the server. This vulnerability can lead to an out-of-bounds write, allowing a remote attacker who compromises an SSH server to execute arbitrary code on the client system when a user connects to the server. The potential ramifications include unauthorized access, data breaches, and system compromise, making it crucial for users to address this vulnerability promptly.

How To Fix

Minimum fixed version

1.4.3-2ubuntu0.2+esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libssh2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can limit access to the SSH server or disable SSH connections until the package is updated. Additionally, consider using firewall rules to restrict access to the affected services.

Conclusion

The integer overflow vulnerability in libssh2 poses a significant risk to users, allowing remote code execution through compromised SSH servers. It is essential for users to update their libssh2 packages to the latest patched versions to mitigate this risk. Regular monitoring for vulnerabilities, such as through Vulert, can help maintain the security of applications.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high level of risk.

Versions of libssh2 prior to 1.8.1 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The vulnerability could allow remote attackers to execute arbitrary code on client systems, leading to unauthorized access and potential data breaches.

Yes, patched versions of libssh2 are available for Ubuntu users. It is recommended to update to the latest versions as specified in the 'how to fix' section.

Related vulnerabilities

Recent vulnerabilities recorded for libssh2.

How To Fix

Minimum fixed version

1.4.3-2ubuntu0.2+esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libssh2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback