Skip to content
Fencer Intel
medium 4.5

CVE-2025-4877 json

Libssh: write beyond bounds in binary to base64 conversion functions

published last yr. modified 4d ago also EUVD-2025-28257

cvss
4.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 10%
public exploits
0
none known

Summary

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.

Patch / fix

  • libssh.org libssh 0.11.2
  • Red Hat Red Hat Enterprise Linux 9 0:0.10.4-18.el9
  • libssh Debian 12 0.10.6-0+deb12u2
  • libssh Debian 14, Debian 13 0.11.2-1

debian advisories DEBIAN-CVE-2025-4877

  • libssh Ubuntu 22.04 LTS 0.9.6-2ubuntu0.22.04.4
  • libssh Ubuntu 24.04 LTS 0.10.6-2ubuntu0.1
  • libssh Ubuntu Pro 16.04 LTS 0.6.3-4.3ubuntu0.6+esm2
  • libssh Ubuntu Pro 18.04 LTS 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4
  • libssh Ubuntu Pro 20.04 LTS 0.9.3-2ubuntu2.5+esm1

ubuntu advisories UBUNTU-CVE-2025-4877

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • libssh RHEL 9 0.10.4-18.el9
  • libssh-config RHEL 9 0.10.4-18.el9

red hat advisories RHSA-2026:18683

  • libssh Linux Micro 6.1 0.10.6-slfo.1.1_2.1
  • libssh Linux Micro 6.0 0.10.6-2.1
  • libssh SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +3 more 0.9.8-150200.13.9.1
  • libssh SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES 15 SP5-LTSS +10 more 0.9.8-150400.3.9.1
  • libssh SLE Module for Basesystem 15 SP7, SLE Module for Basesystem 15 SP6, openSUSE Leap 15.6 0.9.8-150600.11.3.1
  • libssh SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 0.6.3-12.15.1
  • libssh SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 0.9.8-3.15.1

suse advisories SUSE-SU-2025:20596-1SUSE-SU-2025:20557-1SUSE-SU-2025:02755-1SUSE-SU-2025:02281-1SUSE-SU-2025:02279-1SUSE-SU-2025:02278-1

  • libssh openSUSE Tumbleweed 0.11.2-1.1

opensuse advisories openSUSE-SU-2025:15243-1

  • libssh AlmaLinux 9 0.10.4-18.el9
  • libssh-config AlmaLinux 9 0.10.4-18.el9

almalinux advisories ALSA-2026:18683

  • libssh Rocky Linux 9 0.10.4-18.el9

rocky linux advisories RLSA-2026:18683

  • libssh Alpine 3.24, Alpine 3.23, Alpine 3.22 0.11.2-r0

alpine advisories ALPINE-CVE-2025-4877

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2025-4877 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-4877 updated cvss 4.5

libssh: Write beyond bounds in binary to base64 conversion functions

  • Red Hat Enterprise Linux AppStream (v. 9) libssh-devel 0.10.4-18.el9, libssh-debuginfo 0.10.4-18.el9, libssh-debugsource 0.10.4-18.el9 Red Hat Enterprise Linux BaseOS (v. 9) libssh 0.10.4-18.el9, libssh-config 0.10.4-18.el9
    fixed: vendor fix RHSA-2026:18683
  • Red Hat Enterprise Linux 6 libssh2 Red Hat Enterprise Linux 7 libssh2 Red Hat Enterprise Linux 8 libssh, libssh-config Red Hat Enterprise Linux 10 libssh Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
last yr.

Exploit prediction

0.20% chance of exploitation in the next 30 days, higher than 10% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 3.1 4.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Affected products

  • libssh.org libssh
  • Red Hat Red Hat Enterprise Linux 9
  • Red Hat Red Hat Enterprise Linux 10
  • Red Hat Red Hat Enterprise Linux 6
  • Red Hat Red Hat Enterprise Linux 7
  • Red Hat Red Hat Enterprise Linux 8
  • Red Hat Red Hat OpenShift Container Platform 4

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.