Denial of Service Vulnerability in libssh: Integer Overflow in SFTP Server Message Decoding
Summary
UBUNTU-CVE-2025-5449: A flaw was found in the SFTP server message decoding logic of libssh. Affects libssh versions < 0.11.1-1ubuntu0.1. Fixed in 0.11.1-1ubuntu0.1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
libssh is a widely used library that provides an implementation of the SSH protocol, allowing secure communication over unsecured networks. It supports various functionalities, including SFTP (SSH File Transfer Protocol), which enables file access and transfer over SSH. The library is essential for applications requiring secure remote access and file management. However, a recent vulnerability has been identified that could compromise the stability of systems utilizing this library.
Vulnerability Detail
A flaw was found in the SFTP server message decoding logic of libssh. This vulnerability arises from an incorrect packet length check that can lead to an integer overflow when handling large payload sizes on 32-bit systems. The consequence of this flaw is a failed memory allocation, which can cause the server process to crash, resulting in a denial of service. This vulnerability is particularly concerning as it can disrupt services relying on libssh, affecting availability and potentially leading to service outages.
How To Fix
Minimum fixed version
0.11.1-1ubuntu0.1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libssh
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you may consider limiting the size of payloads processed by the SFTP server or restricting access to the SFTP service until the package can be updated. However, this is not a permanent solution and updating the package is strongly advised.
Conclusion
The identified vulnerability in libssh poses a significant risk of denial of service due to an integer overflow in the SFTP server message decoding logic. It is crucial for users of libssh to update to the latest patched version to mitigate this risk. Regular monitoring and vulnerability management practices, such as using tools like Vulert, can help maintain the security of your applications.
See every vulnerability recorded for libssh →
FAQ
The CVSS score of this vulnerability is 4.3, indicating a medium severity level.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
This vulnerability primarily affects systems running libssh versions prior to 0.11.1-1ubuntu0.1, particularly on 32-bit architectures.
While the vulnerability leads to a denial of service, it does not directly cause data loss. However, service disruptions may impact data accessibility.
If an immediate update is not possible, consider implementing access controls or limiting payload sizes as a temporary measure until the package can be updated.
Related vulnerabilities
Recent vulnerabilities recorded for libssh.