CVE-2025-5351
JSON

6.5medium

Libssh: double free vulnerability in libssh key export functions

Severity
6.5medium CVSS:3.1 by redhat
Exploit likelihood
1.24% (higher than 69% of CVEs)
Published
Last changed
Assigned by
redhat

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.

Affected

Product or packageVersionsReported by
libsshfrom 0.10.0 before 0.11.2
Not affected: from 0:0.10.4-18.el9 before *
CVE List
libssh2Not specifiedCVE List
openshift/ose-rhel-coreos-8Not specifiedCVE List
openshift/ose-rhel-coreos-9Not specifiedCVE List
libssh libsshfrom 0.10.0 before 0.11.2NVD
redhat openshift_container_platform4.0NVD
redhat enterprise_linux6.0, 7.0, 8.0, 9.0, 10.0NVD

All scores

redhat6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-415

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Se detectó una falla en la función de exportación de claves de libssh. El problema se produce en la función interna encargada de convertir las claves criptográficas a formatos serializados. Durante la gestión de errores, se libera una estructura de memoria, pero no se borra, lo que puede provocar un problema de doble liberación si se produce un fallo adicional más adelante en la función. Esta condición puede provocar corrupción del montón o inestabilidad de la aplicación en situaciones de memoria insuficiente, lo que supone un riesgo para la fiabilidad del sistema donde se realizan las operaciones de exportación de claves.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-5351 changed 2026-11-24CVE Terms of Use
NVDCVE-2025-5351 changed 2026-11-24Public domain