Skip to main content
No exploitation reportedFix available

CVE-2025-5351

Libssh: double free vulnerability in libssh key export functions

No exploitation reported by the sources we read.

  • Published2025-07-04
  • Fixed in0.11.2
  • WeaknessCWE-415

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2025-07-0409:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-11-03 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2025-5351?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2025-5351?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD
Libssh
BranchAffectedFixed in
0.x≥ 0.10.0, < 0.11.20.11.2
Redhat enterprise linux
BranchAffectedFixed in
6.0= 6.0no fix published
7.0= 7.0no fix published
8.0= 8.0no fix published
9.0= 9.0no fix published
10.0= 10.0no fix published
Redhat openshift container platform
BranchAffectedFixed in
4.0= 4.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA8 products

As redhat, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

2 more products in the CVE record.

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-09-01

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libsshUbuntu:24.04:LTSall versions · fixed in 0.10.6-2ubuntu0.1
  • libsshUbuntu:22.04:LTSall versions · fixed in 0.9.6-2ubuntu0.22.04.4
  • libsshTuxCare:AlmaLinux:9.6all versions · fixed in 0.10.4-15.el9_6.tuxcare.els2and 2 other packages
  • libsshSUSE:Linux Micro 6.1all versions · fixed in 0.10.6-slfo.1.1_2.1
  • libsshSUSE:Linux Micro 6.0all versions · fixed in 0.10.6-2.1
  • libsshRocky Linux:9all versions · fixed in 0:0.10.4-18.el9
  • libsshRed Hat:enterprise_linux:9::baseosall versions · fixed in 0:0.10.4-18.el9and 3 other packages
  • libsshopenSUSE:Tumbleweedall versions · fixed in 0.11.2-1.1

18 more package ranges on OSV.dev

Vendor advisories

  • CVE-2025-5351 Red Hat Product Security32 products fixed · 18 known affected

    libssh: Double Free Vulnerability in libssh Key Export Functions

    libssh as a component of Red Hat Enterprise Linux 10 · libssh-config as a component of Red Hat Enterprise Linux 10 · libssh-devel as a component of Red Hat Enterprise Linux 10 · +15 more

  • RHSA-2026:18683 Red Hat Product Security32 products fixed

    Red Hat Security Advisory: libssh security update

Full record on NVD

Fix

  1. Update Libssh to 0.11.2
  2. Vendor fix Red Hat Product Security RHSA-2026:18683 · 32 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Workaround from the vendor Red Hat Product Security RHSA-2026:18683 · 32 productsMitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. Administrators should apply vendor-supplied patches as soon as th…
  4. No fix available, says the vendor Red Hat Product Security CVE-2025-5351 · 10 productsFix deferred
  5. No fix planned, says the vendor Red Hat Product Security CVE-2025-5351 · 8 productsOut of support scope

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
none listed
PoC-in-GitHub
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Published
2025-07-04
Last Modified
2026-09-01
NVD status
Modified
GitHub Advisory
GHSA-pfqf-mv4p-9j4r

Frequently asked questions

What is CVE-2025-5351?

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.

Is CVE-2025-5351 actively exploited?

Active exploitation of CVE-2025-5351 has not been confirmed. Its EPSS score was 0.6% on 2026-11-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2025-5351?

CVE-2025-5351 has a CVSS v3 base score of 6.5 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.

Running libssh? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record