CVE-2025-4878: Libssh: use of uninitialized variable in privatekey_from_file()
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 doesn't exist and may lead to possible signing failures or heap corruption.
Security readout for executives and security teams
Plain-English summary
Libssh may mishandle a missing private-key file, causing signing failures or memory corruption. Exploitation requires local access, privileges, and difficult conditions; the reported impact is limited to low confidentiality and integrity loss, without expected availability impact.
Executive priority
Treat this as routine but necessary patching, prioritizing systems that programmatically load private keys or permit local users to influence key filenames. Escalate if exposed workflows process untrusted paths or show signing anomalies.
Technical view
Under certain conditions, privatekey_from_file() uses an uninitialized variable when the specified file does not exist. The resulting behavior may include signing failure or heap corruption. CVSS 3.1 scores it 3.6: local attack vector, high complexity, low privileges, no user interaction, and low confidentiality and integrity impact.
Likely exposure
The bundle identifies libssh packages in RHEL 8, RHEL 9 version 0.10.4-18.el9, RHEL 10, and OpenShift Container Platform 4 as affected. RHEL 6 and 7 libssh2 status is unknown. Upstream affected-version boundaries are not provided, so other deployments require vendor confirmation.
Exploitation context
The vulnerability is not listed in KEV, and the supplied sources provide no evidence of active exploitation. The CVSS vector indicates a local, high-complexity attack requiring low privileges. It is not presented as a directly remote vulnerability.
Researcher notes
The bundle describes an uninitialized-variable condition but maps CWE-416, Use After Free; the exact memory-lifetime mechanism is therefore not fully established here. Heap corruption is described as possible, but no demonstrated exploitability or upstream affected-version range is supplied. Red Hat product status is the clearest exposure evidence.
Mitigation direction
Apply the vendor-provided security updates referenced by RHSA-2026:18683 where applicable.
Consult libssh and operating-system vendor advisories for fixed versions outside the identified Red Hat products.
Ensure applications verify that private-key files exist before invoking affected libssh functionality.
Restrict local access to services and workflows that load private keys through libssh.
Validation and detection
Inventory installed libssh packages and identify applications using privatekey_from_file().
Compare Red Hat package versions and product status against RHSA-2026:18683.
Confirm missing private-key files produce controlled errors without signing anomalies or crashes.
Review relevant application logs for unexplained signing failures around missing key-file paths.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
5Timeline events
1ADP providers
7Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.