Integer overflow in libssh - CVE-2025-4877

 

Integer overflow in libssh - CVE-2025-4877

Published: August 12, 2025


Vulnerability identifier: #VU113839
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2025-4877
CWE-ID: CWE-190
Exploitation vector: Local access
Exploit availability: No public exploit available
Vendor: libssh
Affected software:
libssh

Detailed vulnerability description

The vulnerability allows a local user to execute arbitrary code on the target system.

The vulnerability exists due to integer overflow within the bin_to_base64() function in base64.c. A local user can trigger an integer overflow and execute arbitrary code on the target system.

Note, the vulnerability can be exploited only via the ssh_get_fingerprint_hash() function on 32-bit builds in case the API is (mis)used and a libssh consumer passes in an unexpectedly large input buffer.


How to mitigate CVE-2025-4877

Install updates from vendor's website.

Sources