CVE-2025-5351
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · moderate confidenceA double-free vulnerability exists in libssh's key export functionality. During error handling, a memory structure is freed but the pointer is not cleared. If another failure occurs subsequently, the same memory is freed again, causing heap corruption. This is exploitable in low-memory scenarios where multiple error conditions may arise during key export operations.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 4.0= 6.0= 7.0= 8.0= 9.0= 10.0>= 0.10.0, < 0.11.2CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify libssh library versionRun 'ssh -V' or check the shared library version with 'ldd --version' or inspect the libssh package: 'rpm -qa | grep libssh' on RHEL systems, or check the library file directly with 'strings /path/to/libssh.so | grep version'Affected if The installed version is >= 0.10.0 and < 0.11.2
-
Confirm key export operations are performedReview application logs, code, or configuration to determine whether SSH key export or key generation functions from libssh are being called by your applicationAffected if Your application or service uses libssh to export or generate SSH keys
-
Identify low-memory execution contextCheck application runtime environment: review container memory limits ('kubectl get pod -o jsonpath={.spec.containers[*].resources.limits.memory}'), systemd memory limits, or application configuration for memory-constrained settingsAffected if The application runs with memory limits below typical operational requirements or in environments prone to memory pressure
-
Inspect for heap corruption indicatorsRun application under memory debugging tools such as Valgrind or AddressSanitizer if safe to do so, or check system logs (/var/log/messages, dmesg) for heap corruption warnings or segmentation faults related to libsshAffected if Heap corruption errors, crashes, or memory allocation failures occur during or after key export operations
-
Verify OpenSSH or derivative product usageCheck if a Red Hat OpenShift Container Platform version 4.0 or Red Hat Enterprise Linux version 6.0-10.0 is deployed, as these include vulnerable libssh versions: 'oc version' or 'cat /etc/redhat-release'Affected if Running the specified Red Hat products that ship the affected libssh version
You are affected if your environment uses libssh version 0.10.0 through 0.11.1 and performs SSH key export operations, particularly under memory-constrained conditions where multiple error conditions can occur.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped0.11.2
Apply the vendor patch when available; in the interim, avoid performing key export operations under low-memory conditions and monitor for application instability. The fix typically involves setting pointers to NULL after freeing or restructuring error-handling code paths.
libssh version 0.11.2 or later; for RHEL/CentOS systems, apply the vendor security advisory RHSA for this CVE
- Identify all applications and services that depend on libssh in your environment
- Update the libssh package to version 0.11.2 or later using your system's package manager (e.g., yum update libssh or dnf update libssh)
- For Red Hat Enterprise Linux systems, run: yum update libssh (or dnf update libssh) to pull in the fixed package
- Restart any services or applications that use libssh to ensure the updated library is loaded
- Verify the installed libssh version matches or exceeds 0.11.2 using: rpm -q libssh or ssh -V
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,888.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-5351 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-5351 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data