Null-Dereference READ Vulnerability in libssh2 Package

libssh2 Updated 02 Oct 2025

Summary

05/06/2025
N/A
No i
Unrated
Not published

OSV-2025-433: Null-dereference READ in _libssh2_packet_add. Affects libssh2 versions >= d34d9258b8420b19ec3f97b4cc5bf7aa7d98e35a. No fix is published. 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 an open-source library that provides a way to implement SSH2 protocol in applications. It is widely used for secure file transfers and remote command execution. The library is designed to be lightweight and efficient, making it a popular choice for developers needing SSH capabilities. However, like many software libraries, it can be susceptible to vulnerabilities that may compromise the security and stability of applications that depend on it.

Vulnerability Detail

The vulnerability identified as OSV-2025-433 is a null-dereference READ issue occurring in the _libssh2_packet_add function. This vulnerability can lead to application crashes, potentially allowing attackers to exploit the situation for denial of service attacks. The issue arises from improper handling of null pointers, which can result in unexpected behavior when the library processes packets. The vulnerability was reported through OSS-Fuzz, highlighting its critical nature and the need for immediate attention.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can implement additional checks in their code to ensure that pointers are not null before invoking functions that rely on them. This can prevent crashes while a permanent fix is being applied. Example code snippet: if (packet != NULL) {

_libssh2_packet_add(packet);

}

Conclusion

The null-dereference READ vulnerability in the libssh2 package poses a significant risk to applications relying on this library. It is crucial for developers to update to the latest version to mitigate the risk of exploitation. Additionally, implementing temporary workarounds can help maintain stability until a full update is applied.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

The vulnerability is a null-dereference READ issue that can cause application crashes.

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

Exploitation of this vulnerability can lead to denial of service attacks, affecting the availability of the application.

Yes, a patched version of the libssh2 package is available. It is recommended to update to the latest version.

Implement additional null checks in your code as a temporary workaround to prevent crashes.

Related vulnerabilities

Recent vulnerabilities recorded for libssh2.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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