Quick answers
- Is CVE-2025-4878 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2025-4878 being exploited in the wild.
- How severe is CVE-2025-4878?
- Low severity, with a CVSS score of 3.6, published 22 July 2025.
- Which products and versions are affected?
- Libssh Versions prior to 0.10.4-18 (RHEL 9) and equivalent upstream versions.
- Is there a fix for CVE-2025-4878?
- A patch was published on 2026-05-19: Red Hat Enterprise Linux 9 security update released (RHSA-2026:18683) Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2025-4878 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2025-4878?
- Check whether you run Libssh at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
A vulnerability exists in libssh within the `privatekey_from_file()` function due to the use of an uninitialized variable. This flaw is triggered when the function is called with a filename that does not exist on the filesystem, causing the function to return an invalid private key object. An attacker with local access and low privileges could potentially exploit this to cause a Use-After-Free (UAF) condition or heap corruption, although the complexity is high. The affected function is deprecated. Patches have been released by the libssh maintainers and downstream vendors like Red Hat to ensure pointers are properly initialized.
Affected products
- libssh libssh Versions prior to 0.10.4-18 (RHEL 9) and equivalent upstream versions
Timeline
- 2025-04-23: other: Initial fix developed by maintainers
- 2025-07-03: disclosed: Bug reported to Red Hat Bugzilla
- 2025-07-22: advisory: CVE published by NVD/Red Hat
- 2026-05-19: patched: Red Hat Enterprise Linux 9 security update released (RHSA-2026:18683)
References
- https://access.redhat.com/errata/RHSA-2026:18683
- https://access.redhat.com/security/cve/CVE-2025-4878
- https://bugzilla.redhat.com/show_bug.cgi?id=2376184
- 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