SB2025062451 - Information disclosure in libssh
Published: June 24, 2025 Updated: August 12, 2025
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 3 secuirty vulnerabilities.
1) Out-of-bounds read (CVE-ID: CVE-2025-5318)
The vulnerability allows a remote user to gain access to potentially sensitive information.
The vulnerability exists due to a boundary condition within the sftp_handle() function. A remote user can trigger an out-of-bounds read error and read contents of memory on the system.
2) Use-after-free (CVE-ID: CVE-2025-4878)
The vulnerability allows a local user to escalate privileges on the system.
The vulnerability exists due to a use-after-free error within the privatekey_from_file() function. A local user can trigger a use-after-free error and execute arbitrary code with elevated privileges.
3) Integer overflow (CVE-ID: CVE-2025-4877)
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.
Remediation
Install update from vendor's website.
References
- https://bugzilla.redhat.com/show_bug.cgi?id=2369131
- https://www.libssh.org/security/advisories/CVE-2025-5318.txt
- https://git.libssh.org/projects/libssh.git/commit/?id=697650caa97eaf7623924c75f9fcfec6dd423cd1
- https://git.libssh.org/projects/libssh.git/commit/?id=b35ee876adc92a208d47194772e99f9c71e0bedb
- https://www.libssh.org/security/advisories/CVE-2025-4878.txt
- https://git.libssh.org/projects/libssh.git/commit/?id=00f09acbec55962839fc7837ef14c56fb8fbaf72
- https://www.libssh.org/security/advisories/CVE-2025-4877.txt