Integer Overflow Vulnerability in libssh2: Potential Remote Code Execution Risk

libssh2 Updated 02 Oct 2025

Summary

21/03/2019
N/A
Yes i
Unrated
Not published

DEBIAN-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.8.0-2.1. Fixed in 1.8.0-2.1. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libssh2 is a widely used library that provides an implementation of the SSH2 protocol, allowing secure communication over unsecured networks. It is utilized in various applications for secure file transfers and remote command execution. The library is essential for developers needing to integrate SSH capabilities into their software. However, a critical vulnerability has been identified that could compromise the security of systems using this library.

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 allows a remote attacker to exploit the flaw by sending specially crafted packets, potentially leading to an out-of-bounds write. If successfully exploited, this could allow the attacker to execute arbitrary code on the client system when a user connects to the compromised SSH server.

How To Fix

Minimum fixed version

1.8.0-2.1

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 measure, users can avoid connecting to untrusted SSH servers until the package is updated. Additionally, implementing strict firewall rules to limit access to SSH services can help mitigate the risk.

Conclusion

The integer overflow vulnerability in libssh2 poses a significant risk, allowing remote code execution through crafted packets. It is crucial for users to update to the patched version to safeguard their systems. Implementing workarounds can provide temporary relief while awaiting updates.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

libssh2 is a library that implements the SSH2 protocol, enabling secure communication for file transfers and remote command execution.

The integer overflow vulnerability allows remote attackers to send crafted packets that can lead to out-of-bounds writes, potentially enabling code execution on the client system.

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

If an immediate update is not possible, avoid connecting to untrusted SSH servers and consider implementing firewall rules to restrict SSH access.

You can visit Vulert at https://vulert.com, which monitors and alerts for open-source vulnerabilities in your software using just a manifest file.

Related vulnerabilities

Recent vulnerabilities recorded for libssh2.

How To Fix

Minimum fixed version

1.8.0-2.1

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

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.