LiveActive security incident?Get immediate response
CVE Record

CVE-2025-4877: Libssh: write beyond bounds in binary to base64 conversion functions

There'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.

MediumCVSS 4.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2025-4877 is a libssh memory corruption flaw affecting only 32-bit builds. A program using libssh can write past allocated memory when handling an unexpectedly large fingerprint hash conversion input. Business risk is limited by local access, high attack complexity, and 32-bit scope, but affected servers should still be patched through vendor guidance.

Executive priority

Treat this as a scheduled patching item, not an emergency response, unless your environment still runs affected 32-bit RHEL 9 libssh deployments in sensitive workloads.

Technical view

The issue is an integer overflow in libssh bin_to_base64() reached through ssh_get_fingerprint_hash(). The overflow can cause under-allocation followed by an out-of-bounds heap write. The source bundle identifies CWE-787, CVSS 4.5, and affected Red Hat Enterprise Linux 9 libssh package version 0:0.10.4-18.el9, with only 32-bit builds affected.

Likely exposure

Exposure is most plausible on 32-bit systems or 32-bit builds of software linked against libssh. Red Hat lists RHEL 9 libssh 0:0.10.4-18.el9 as affected, while RHEL 8, RHEL 10, libssh2 on RHEL 6/7, and OpenShift Container Platform 4 are listed as unaffected.

Exploitation context

The provided data does not show active exploitation, and KEV status is false. Exploitation requires local access, low privileges, high attack complexity, and a libssh consumer passing an unexpectedly large buffer into the affected fingerprint function.

Researcher notes

Focus review on integer size handling around bin_to_base64() and ssh_get_fingerprint_hash(). The evidence names memory under-allocation and heap overwrite, but does not provide proof of exploitability beyond local, high-complexity conditions.

Mitigation direction

  • Apply Red Hat fixes from RHSA-2026:18683 where applicable.
  • Check libssh advisory and vendor guidance for upstream fixed versions.
  • Prioritize affected 32-bit builds over unaffected 64-bit deployments.
  • Rebuild or update software statically bundling affected libssh code.
  • Document exceptions where products are confirmed unaffected by vendor status.

Validation and detection

  • Inventory libssh packages and versions across hosts, containers, and appliances.
  • Confirm whether deployments use 32-bit builds or 32-bit compatibility packages.
  • Check SBOMs for bundled or statically linked libssh copies.
  • Map Red Hat assets against the affected and unaffected product list.
  • Verify patched package versions after applying vendor updates.
Prepared
Confidence
high
Sources
7

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-787: 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.

Open ATT&CK lookup
description · low confidence lookup

Container behavior lookup

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.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-4877 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
4.5 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

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
6Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

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.

ScoreVersionSeverityVectorExploitImpactSource
4.5CVSS 3.1MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L13.4redhat

Vulnerability scoring details

Base CVSS 3.1 score

4.5Medium
CVSS 3.1 vector shape for CVE-2025-4877Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. Source timelineredhat

    Made public.

  3. Source timelineredhat

    Reported to Red Hat.

  4. CVE publishedCVE Program

    The CVE record was published.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Unknown vendorlibsshlibssh, 0unaffected
Red HatRed Hat Enterprise Linux 9libssh, 0:0.10.4-18.el9affected
Red HatRed Hat Enterprise Linux 9libssh, 0:0.10.4-18.el9affected
Red HatRed Hat Enterprise Linux 10libsshunaffected
Red HatRed Hat Enterprise Linux 6libssh2unaffected
Red HatRed Hat Enterprise Linux 7libssh2unaffected
Red HatRed Hat Enterprise Linux 8libsshunaffected
Red HatRed Hat OpenShift Container Platform 4rhcosunaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-787 · source CWE mapping

Out-of-bounds Write

Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.