CVE-2025-4877: libssh Out-of-bounds Write
Vulnerability summary
CVE-2025-4877 is a medium (CVSS 4.5) Out-of-bounds Write vulnerability in libssh. EPSS estimates a 0.20% chance of exploitation in the next 30 days, higher than 9.6% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 13 · Related 10Timeline
- 20-08-2025PublishedVulnerability first disclosed.
- 31-08-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
- OSV · DebianEcosystem advisory · calculated4.5MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
- NVDNIST4.5MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
EPSS trend
Probability
0.20%
Chance of exploitation in the next 30 days
Percentile
10%
Versus all other CVEs
30-day change
+0.01 pp
From 0.20% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian1 product
- libssh< 0.10.6-0+deb12u2 | < 0.11.2-1
Ubuntu1 product
- libssh< 0.6.3-4.3ubuntu0.6+esm2 | < 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4 | < 0.9.3-2ubuntu2.5+esm1 | < 0.9.6-2ubuntu0.22.04.4 | < 0.10.6-2ubuntu0.1
2 vendors · 2 products