CVE-2025-5351

Libssh: double free vulnerability in libssh key export functions

State
Published
Severity
6.5 Medium
Published
Jul 4, 2025
Updated
Sep 1, 2026
Reserved
May 30, 2025

Read the record on cve.org

Description

A flaw was found in the key export functionality of libssh. The issue occurs in the internal function responsible for converting cryptographic keys into serialized formats. During error handling, a memory structure is freed but not cleared, leading to a potential double free issue if an additional failure occurs later in the function. This condition may result in heap corruption or application instability in low-memory scenarios, posing a risk to system reliability where key export operations are performed.

Scores

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:Hredhat

Weaknesses

Affected Products

ProductVersions
libsshlibssh
  • 0.10.0 to before 0.11.2Affected
Red Hat Enterprise Linux 9Red Hat
  • 0:0.10.4-18.el9 and laterNot affected
Red Hat Enterprise Linux 9Red Hat
  • 0:0.10.4-18.el9 and laterNot affected
Red Hat Enterprise Linux 10Red Hat
    Red Hat Enterprise Linux 6Red Hat
      Red Hat Enterprise Linux 7Red Hat
        Red Hat Enterprise Linux 8Red Hat
          Red Hat OpenShift Container Platform 4Red Hat
            Red Hat OpenShift Container Platform 4Red Hat

              References

              Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.