CVE-2025-4877
Libssh: write beyond bounds in binary to base64 conversion functions
Reported by redhat · Published August 20, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| libssh-devel | errata.rockylinux.org | 0.10.4-18.el9.aarch64 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| 0 | ||
| Red Hat | Red Hat Enterprise Linux 9 | 0:0.10.4-18.el9 |
| Red Hat | Red Hat Enterprise Linux 9 | 0:0.10.4-18.el9 |
| 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 | |
| Red Hat | Red Hat OpenShift Container Platform 4 | |
| Red Hat | Red Hat Enterprise Linux 8 | |
| Red Hat | Red Hat Enterprise Linux 9 | 0:0.10.4-18.el9 |
| Red Hat | Red Hat OpenShift Container Platform 4 | |
| Red Hat | Red Hat Enterprise Linux 7 | |
| 0 | ||
| Red Hat | Red Hat Enterprise Linux 10 | |
| Red Hat | Red Hat Enterprise Linux 6 | |
| Red Hat | Red Hat OpenShift Container Platform 4 | |
| Red Hat | Red Hat In-Vehicle Operating System 1 | |
| alpine | libssh | 0 |
| Red Hat | Red Hat OpenShift Container Platform 4 |
Timeline
- Jun 29, 2025 CVE Published
- Aug 20, 2025 Coalition ESS Score (9 in total, the first dated here)
- Aug 21, 2025 EPSS Score (30 in total, the first dated here)
- May 29, 2026 Distribution Patch (43 in total, the first dated here)
- May 29, 2026 Security Advisory (43 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-4877
vulnetix vdb fixes CVE-2025-4877
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-4877/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- RHSA-2026:18683 vendor-advisoryx_refsource_REDHAT
- vdb-entryx_refsource_REDHAT
- RHBZ#2376193 issue-trackingx_refsource_REDHAT