Libssh: write beyond bounds in binary to base64 conversion functions

Summary

CVECVE-2025-4877
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2025-08-20 13:15:28 UTC
Updated2026-05-19 14:16:28 UTC
DescriptionThere's a vulnerability in the libssh package where when a libssh consumer passes in an unexpectedly large input buffer to ssh_get_fingerprint_hash() function. In such cases the bin_to_base64() function can experience an integer overflow leading to a memory under allocation, when that happens it's possible that the program perform out of bounds write leading to a heap corruption. This issue affects only 32-bits builds of libssh.

Risk And Classification

Primary CVSS: v3.1 4.5 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

EPSS: 0.000350000 probability, percentile 0.106030000 (date 2026-05-26)

Problem Types: CWE-787 | CWE-787 Out-of-bounds Write


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary4.5MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
3.1CNACVSS4.5MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Red Hat Red Hat Enterprise Linux 9 unaffected 0:0.10.4-18.el9 * rpm Not specified
CNA Red Hat Red Hat Enterprise Linux 9 unaffected 0:0.10.4-18.el9 * rpm Not specified
CNA Red Hat Red Hat Enterprise Linux 10 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 6 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 7 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 8 Not specified Not specified
CNA Red Hat Red Hat OpenShift Container Platform 4 Not specified Not specified

References

ReferenceSourceLinkTags
bugzilla.redhat.com/show_bug.cgi [email protected] bugzilla.redhat.com
www.libssh.org/security/advisories/CVE-2025-4877.txt [email protected] www.libssh.org
git.libssh.org/projects/libssh.git/commit [email protected] git.libssh.org
access.redhat.com/errata/RHSA-2026:18683 [email protected] access.redhat.com
access.redhat.com/security/cve/CVE-2025-4877 [email protected] access.redhat.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

SourceTimeEvent
CNA2025-07-03T18:04:11.051ZReported to Red Hat.
CNA2025-06-24T00:00:00.000ZMade public.
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report