CVE Vulnerabilities

CVE-2025-4878

Use After Free

Published: Jul 22, 2025 | Modified: Jul 29, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
3.6 LOW
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
Ubuntu
MEDIUM

A vulnerability was found in libssh, where an uninitialized variable exists under certain conditions in the privatekey_from_file() function. This flaw can be triggered if the file specified by the filename doesnt exist and may lead to possible signing failures or heap corruption.

Weakness

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.

Affected Software

Name Vendor Start Version End Version
Libssh Ubuntu esm-infra/bionic *
Libssh Ubuntu esm-infra/focal *
Libssh Ubuntu esm-infra/xenial *
Libssh Ubuntu jammy *
Libssh Ubuntu noble *
Libssh Ubuntu oracular *
Libssh Ubuntu plucky *
Libssh Ubuntu upstream *

Potential Mitigations

References