Bug 2369367 (CVE-2025-5351) - CVE-2025-5351 libssh: Double Free Vulnerability in libssh Key Export Functions
Summary: CVE-2025-5351 libssh: Double Free Vulnerability in libssh Key Export Functions
Keywords:
Status: NEW
Alias: CVE-2025-5351
Deadline: 2025-06-24
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-30 07:17 UTC by OSIDB Bzimport
Modified: 2025-07-04 08:15 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-30 07:17:41 UTC
A Double Free vulnerability exists in libssh’s key export mechanism when built against OpenSSL 3.0 or later. The flaw lies in the pki_key_to_blob() function, where a memory structure (params) is deallocated during error handling but not properly nullified. If a subsequent operation encounters an error, the same structure may be freed again, leading to undefined behavior and potential process crashes. Although exploitation requires authenticated access and specific memory failure conditions, the flaw could be leveraged to destabilize applications using libssh for exporting SSH key material.

Affected versions : libssh >= 0.10.0, built with OpenSSL >= 3.0


Note You need to log in before you can comment on or make changes to this bug.