CVE & CISA-KEV Catalog

CVE-2025-4877

MEDIUM
4.5
CVSS v3
NVD

Description

There's a vulnerability in the libssh package where when a libssh consumer passes in an unexpectedly large input buffer to ssh_get_fingerprint_hash() function. In such cases the bin_to_base64() function can experience an integer overflow leading to a memory under allocation, when that happens it's possible that the program perform out of bounds write leading to a heap corruption. This issue affects only 32-bits builds of libssh.

How to fix

Remediation Available
libsshDebian
Fixed in:0.9.8-0+deb11u2CVE-2025-4877
Fixed in:0.10.6-0+deb12u2CVE-2025-4877
Fixed in:0.11.2-1CVE-2025-4877
Fixed in:0.11.2-1CVE-2025-4877
libsshRocky
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libsshRed Hat / RHEL
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-configRocky
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-configRed Hat / RHEL
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-debuginfoRocky
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-debuginfoRed Hat / RHEL
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-debugsourceRocky
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-debugsourceRed Hat / RHEL
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-develRocky
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libssh-develRed Hat / RHEL
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
Fixed in:0:0.10.4-18.el9RHSA-2026:18683
libsshUbuntu
Fixed in:0.6.3-4.3ubuntu0.6+esm2USN-7696-1
Fixed in:0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4USN-7696-1
Fixed in:0.9.3-2ubuntu2.5+esm1USN-7696-1
Fixed in:0.9.6-2ubuntu0.22.04.4USN-7619-1
Fixed in:0.10.6-2ubuntu0.1USN-7619-1
libssh-4Ubuntu
Fixed in:0.6.3-4.3ubuntu0.6+esm2USN-7696-1
Fixed in:0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4USN-7696-1
Fixed in:0.9.3-2ubuntu2.5+esm1USN-7696-1
Fixed in:0.9.6-2ubuntu0.22.04.4USN-7619-1
Fixed in:0.10.6-2ubuntu0.1USN-7619-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityHigh
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityLow
IntegrityLow
AvailabilityLow

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Exploit Intelligence

0.18%probability of exploitation in 30 days
8thpercentile

Low risk: more likely to be exploited than 8% of all known CVEs.

References

Related Vulnerabilities

Other CWE-787 (Out-of-bounds Write) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2025-22457Critical9.0100%KEV + RansomFix
CVE-2025-0282Critical9.0100%KEV + Ransom-
CVE-2015-3113Critical9.8100%KEVFix
CVE-2021-20038Critical9.8100%KEV + Ransom-
CVE-2023-4863High8.8100%KEVFix
CVE-2020-16040Medium6.5100%-Fix
Embed a live status badge for CVE-2025-4877
CVE-2025-4877 severity badge

Markdown

[![CVE-2025-4877](https://tridentstack.com/cve/badge/CVE-2025-4877.svg)](https://tridentstack.com/cve/CVE-2025-4877)

HTML

<a href="https://tridentstack.com/cve/CVE-2025-4877"><img src="https://tridentstack.com/cve/badge/CVE-2025-4877.svg" alt="CVE-2025-4877"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-06-30.