Security Vulnerability in libssh: Invalid Return Code for ChaCha20 Poly1305

libssh Updated 24 Dec 2025

Summary

17/12/2025
N/A
Yes i
Unrated
Not published

ALSA-2025:23483: Moderate: libssh security update. Affects libssh versions < 0.10.4-17.el9_7. Fixed in 0.10.4-17.el9_7. 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 protocol, enabling secure communication between client and server applications. It is known for its flexibility and performance, supporting various cryptographic algorithms. However, a recent security issue has been identified that affects its functionality, specifically when using the OpenSSL backend with the ChaCha20 Poly1305 algorithm.

Vulnerability Detail

The vulnerability arises from an invalid return code in the libssh library when utilizing the ChaCha20 Poly1305 encryption method with the OpenSSL backend. This flaw could potentially lead to security breaches, as it may allow attackers to exploit the improper handling of encryption, compromising the confidentiality and integrity of data transmitted over SSH connections. The issue has been assigned CVE-2025-5987, highlighting its significance and the need for immediate attention.

How To Fix

Minimum fixed version

0.10.4-17.el9_7

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

As a temporary workaround, users may consider disabling the use of the ChaCha20 Poly1305 algorithm in their SSH configurations until the update can be applied. This can be done by modifying the SSH configuration files to exclude this encryption method.

Conclusion

The libssh library has a moderate security vulnerability related to the ChaCha20 Poly1305 encryption method. It is crucial for users to update to the latest patched version to mitigate potential risks. Temporary workarounds are available, but the best course of action is to apply the update as soon as possible.

See every vulnerability recorded for libssh →

Share this vulnerability

FAQ

CVE-2025-5987 is the identifier assigned to the vulnerability in libssh that involves an invalid return code for the ChaCha20 Poly1305 encryption method.

This vulnerability can compromise the security of data transmitted over SSH connections, potentially allowing unauthorized access or data manipulation.

If an immediate update is not possible, consider disabling the ChaCha20 Poly1305 algorithm in your SSH configuration as a temporary workaround.

More details can be found on the CVE page for CVE-2025-5987, which provides insights into the impact and technical specifics of the vulnerability.

You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in your software using just a manifest file. Check your application for vulnerabilities at the Vulert playground.

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.10.4-17.el9_7

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