Security Flaw in libssh: Incorrect Return Code Handling Vulnerability

libssh Updated 02 Dec 2025

Summary

24/11/2025
N/A
Yes i
Unrated
Not published

ALSA-2025:21977: Moderate: libssh security update. Affects libssh versions < 0.9.6-16.el8_10. Fixed in 0.9.6-16.el8_10. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

libssh is a widely used library that implements the SSH (Secure Shell) protocol, enabling secure communication between client and server applications. It is integral for various applications requiring secure data transmission over unsecured networks. The library is designed to provide a robust framework for implementing SSH functionalities, including authentication, encryption, and data integrity. However, vulnerabilities in such libraries can lead to severe security risks, making it crucial for developers to stay informed about potential issues.

Vulnerability Detail

The vulnerability identified as CVE-2025-5372 in libssh pertains to incorrect return code handling in the ssh_kdf() function. This flaw can lead to unintended behavior during the key derivation process, potentially allowing attackers to exploit the library in ways that compromise the security of the SSH protocol. The ramifications of this vulnerability could include unauthorized access to sensitive data or systems, making it imperative for users of the library to address this issue promptly.

How To Fix

Minimum fixed version

0.9.6-16.el8_10

This is the first release that contains the fix.

sudo dnf update libssh

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

Workaround

Currently, no specific workarounds have been provided for this vulnerability. The best course of action is to apply the available patch as soon as possible.

Conclusion

The libssh library has a critical vulnerability (CVE-2025-5372) that requires immediate attention. Users should update to the patched version to mitigate the risks associated with this flaw. Staying informed and proactive in addressing such vulnerabilities is essential for maintaining secure applications.

See every vulnerability recorded for libssh →

Share this vulnerability

FAQ

libssh is a library that implements the SSH protocol, allowing secure communication between client and server applications.

CVE-2025-5372 is the identifier for a vulnerability in libssh related to incorrect return code handling in the ssh_kdf() function.

The risks include potential unauthorized access to sensitive data and systems due to improper handling of return codes during key derivation.

You can use Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.

You can update libssh by running the command 'sudo dnf update libssh' in your terminal to install the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for libssh.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

0.9.6-16.el8_10

This is the first release that contains the fix.

sudo dnf update libssh

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