CVE-2025-4877: Out-of-bounds Write
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.
AI Analysis
Technical Summary
CVE-2025-4877 is a vulnerability identified in the libssh package, specifically affecting 32-bit builds. The issue occurs when the ssh_get_fingerprint_hash() function is passed an unexpectedly large input buffer. This triggers an integer overflow in the bin_to_base64() function, which is responsible for converting binary data to base64 encoding. The integer overflow leads to memory under allocation, meaning the allocated buffer is smaller than required. Consequently, when the function writes data, it performs out-of-bounds writes beyond the allocated heap buffer, causing heap corruption. Heap corruption can lead to unpredictable behavior including crashes, data corruption, or potentially arbitrary code execution if exploited effectively. However, exploitation complexity is high, requiring local access with low privileges, and no user interaction is needed. The vulnerability does not affect 64-bit builds, limiting the scope of impact. No patches or known exploits are currently reported, but the flaw is publicly disclosed and assigned a CVSS v3.1 score of 4.5 (medium severity), reflecting limited confidentiality, integrity, and availability impacts with a high attack complexity and local attack vector. The vulnerability is particularly relevant for environments still running 32-bit libssh, which may include embedded systems, legacy applications, or specialized hardware.
Potential Impact
For European organizations, the impact of CVE-2025-4877 is moderate but context-dependent. Organizations relying on 32-bit libssh builds, often found in embedded devices, legacy systems, or specialized network appliances, could experience heap corruption leading to application crashes or data integrity issues. While the vulnerability does not currently have known exploits in the wild, successful exploitation could disrupt services or potentially allow privilege escalation if combined with other vulnerabilities. Confidentiality impact is limited but possible if heap corruption leads to information leakage. The medium CVSS score reflects the need for caution but not immediate critical alarm. Organizations with extensive use of 32-bit systems in sectors such as industrial control, telecommunications, or government infrastructure should prioritize assessment. The threat is less relevant for environments predominantly running 64-bit architectures, which are common in modern enterprise IT but less so in embedded contexts.
Mitigation Recommendations
1. Monitor libssh project and vendor advisories for official patches addressing CVE-2025-4877 and apply them promptly once available. 2. Audit your environment to identify any 32-bit libssh deployments, particularly in embedded devices, legacy systems, or network appliances. 3. Where feasible, upgrade affected systems to 64-bit architectures or newer libssh versions that are not vulnerable. 4. Employ memory protection mechanisms such as Address Space Layout Randomization (ASLR) and heap protection features to reduce exploitation risk. 5. Restrict local access to systems running vulnerable libssh versions to trusted users only, minimizing the attack surface. 6. Implement runtime application self-protection (RASP) or intrusion detection systems that can detect anomalous memory corruption behaviors. 7. Conduct regular security assessments and code audits for custom applications integrating libssh to ensure no unsafe usage patterns exist. 8. Prepare incident response plans to quickly address potential exploitation attempts involving heap corruption.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Poland, Netherlands
CVE-2025-4877: Out-of-bounds Write
Description
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-4877 is a vulnerability identified in the libssh package, specifically affecting 32-bit builds. The issue occurs when the ssh_get_fingerprint_hash() function is passed an unexpectedly large input buffer. This triggers an integer overflow in the bin_to_base64() function, which is responsible for converting binary data to base64 encoding. The integer overflow leads to memory under allocation, meaning the allocated buffer is smaller than required. Consequently, when the function writes data, it performs out-of-bounds writes beyond the allocated heap buffer, causing heap corruption. Heap corruption can lead to unpredictable behavior including crashes, data corruption, or potentially arbitrary code execution if exploited effectively. However, exploitation complexity is high, requiring local access with low privileges, and no user interaction is needed. The vulnerability does not affect 64-bit builds, limiting the scope of impact. No patches or known exploits are currently reported, but the flaw is publicly disclosed and assigned a CVSS v3.1 score of 4.5 (medium severity), reflecting limited confidentiality, integrity, and availability impacts with a high attack complexity and local attack vector. The vulnerability is particularly relevant for environments still running 32-bit libssh, which may include embedded systems, legacy applications, or specialized hardware.
Potential Impact
For European organizations, the impact of CVE-2025-4877 is moderate but context-dependent. Organizations relying on 32-bit libssh builds, often found in embedded devices, legacy systems, or specialized network appliances, could experience heap corruption leading to application crashes or data integrity issues. While the vulnerability does not currently have known exploits in the wild, successful exploitation could disrupt services or potentially allow privilege escalation if combined with other vulnerabilities. Confidentiality impact is limited but possible if heap corruption leads to information leakage. The medium CVSS score reflects the need for caution but not immediate critical alarm. Organizations with extensive use of 32-bit systems in sectors such as industrial control, telecommunications, or government infrastructure should prioritize assessment. The threat is less relevant for environments predominantly running 64-bit architectures, which are common in modern enterprise IT but less so in embedded contexts.
Mitigation Recommendations
1. Monitor libssh project and vendor advisories for official patches addressing CVE-2025-4877 and apply them promptly once available. 2. Audit your environment to identify any 32-bit libssh deployments, particularly in embedded devices, legacy systems, or network appliances. 3. Where feasible, upgrade affected systems to 64-bit architectures or newer libssh versions that are not vulnerable. 4. Employ memory protection mechanisms such as Address Space Layout Randomization (ASLR) and heap protection features to reduce exploitation risk. 5. Restrict local access to systems running vulnerable libssh versions to trusted users only, minimizing the attack surface. 6. Implement runtime application self-protection (RASP) or intrusion detection systems that can detect anomalous memory corruption behaviors. 7. Conduct regular security assessments and code audits for custom applications integrating libssh to ensure no unsafe usage patterns exist. 8. Prepare incident response plans to quickly address potential exploitation attempts involving heap corruption.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2025-05-16T22:23:41.045Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68a5c06fad5a09ad0004bff1
Added to database: 8/20/2025, 12:32:47 PM
Last enriched: 11/20/2025, 9:36:53 PM
Last updated: 11/22/2025, 9:01:44 AM
Views: 67
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-13318: CWE-862 Missing Authorization in codepeople Booking Calendar Contact Form
MediumCVE-2025-13136: CWE-862 Missing Authorization in westerndeal GSheetConnector For Ninja Forms
MediumCVE-2025-13384: CWE-862 Missing Authorization in codepeople CP Contact Form with PayPal
HighCVE-2025-13317: CWE-862 Missing Authorization in codepeople Appointment Booking Calendar
MediumCVE-2025-12877: CWE-862 Missing Authorization in themeatelier IDonate – Blood Donation, Request And Donor Management System
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.