cve.bz

CVE-2025-4877 Out-of-bounds Write

4.5 mediumEPSS 0.2%Fix available

Medium (4.5). EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

4.5 medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 15th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-08-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • Red Hat Red Hat Enterprise Linux 9: fixed in 0:0.10.4-18.el9
  • Debian, Ubuntu, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux, Alpine, Alpaquita: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2025-4877 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-4877?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-4877?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-4877 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Versions

From the CNA's record in the CVE List.

Fixed in

ProductFixed in
Red Hat Enterprise Linux 90:0.10.4-18.el9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11libssh0.9.8-0+deb11u2DLA-4385-1
Debian12libssh0.10.6-0+deb12u2DEBIAN-CVE-2025-4877
Debian13, 14libssh0.11.2-1DEBIAN-CVE-2025-4877
Ubuntu22.04:LTSlibssh0.9.6-2ubuntu0.22.04.4UBUNTU-CVE-2025-4877 USN-7619-1
Ubuntu24.04:LTSlibssh0.10.6-2ubuntu0.1UBUNTU-CVE-2025-4877 USN-7619-1
UbuntuPro:16.04:LTSlibssh0.6.3-4.3ubuntu0.6+esm2UBUNTU-CVE-2025-4877 USN-7696-1
UbuntuPro:18.04:LTSlibssh0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4UBUNTU-CVE-2025-4877 USN-7696-1
UbuntuPro:20.04:LTSlibssh0.9.3-2ubuntu2.5+esm1UBUNTU-CVE-2025-4877 USN-7696-1
Red Hatenterprise_linux:9::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.10.4-18.el9RHSA-2026:18683
Red Hatenterprise_linux:9::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.10.4-18.el9RHSA-2026:18683
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Micro 5.1 and 3 morelibssh0.9.8-150200.13.9.1SUSE-SU-2025:02279-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 10 morelibssh0.9.8-150400.3.9.1SUSE-SU-2025:02278-1
SUSELinux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Basesystem 15 SP7libssh0.9.8-150600.11.3.1SUSE-SU-2025:02229-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5libssh0.6.3-12.15.1SUSE-SU-2025:02755-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5libssh0.9.8-3.15.1SUSE-SU-2025:02281-1
SUSELinux Micro 6.0libssh0.10.6-2.1SUSE-SU-2025:20557-1
SUSELinux Micro 6.1libssh0.10.6-slfo.1.1_2.1SUSE-SU-2025:20596-1
openSUSELeap 15.6libssh0.9.8-150600.11.3.1SUSE-SU-2025:02229-1
openSUSETumbleweedlibssh0.11.2-1.1openSUSE-SU-2025:15243-1
AlmaLinux9libssh, libssh-devel, libssh-config0.10.4-18.el9ALSA-2026:18683
Rocky Linux9libssh0:0.10.4-18.el9RLSA-2026:18683
Alpinev3.22, v3.23, v3.24libssh0.11.2-r0ALPINE-CVE-2025-4877
Alpaquita23, 25, streamlibssh0.11.2-r0BELL-CVE-2025-4877

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Product Security classified this vulnerability as having a Moderate severity. This happens because of the complexity of the attack, the possible misusage of the libssh API and the fact the attacker may not have full control over the positions and contents written into the heap.

No supported Red Hat products are affected by this issue since only 32-bit builds are vulnerable.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9libssh-0:0.10.4-18.el9Fixed 2026-05-19RHSA-2026:18683
Red Hat Enterprise Linux 10libsshNot affected
Red Hat Enterprise Linux 6libssh2Not affected
Red Hat Enterprise Linux 7libssh2Not affected
Red Hat Enterprise Linux 8libsshNot affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Not affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-4877.

References

Check your stackJSON