Threat reportVulnerabilityTL-2026-0931
CVE-2026-55200: libssh2 Integer Overflow to Heap Out-of-Bounds Write in ssh2_transport_read()
An integer-overflow-to-heap-buffer-overflow flaw (CWE-680) in libssh2's ssh2_transport_read() fails to enforce upper bounds on the SSH packet_length field, letting a malicious or MITM SSH peer trigger a pre-authentication out-of-bounds heap write that can lead to remote code execution or denial of service.
Key facts
| Identifiers | TL-2026-0931, CVE-2026-55200 |
|---|---|
| Also known as | GHSA-r8mh-x5qv-7gg2 |
| Severity | CRITICAL |
| CVSS | 9.2 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N) |
| Exploitation status | Public proof-of-concept exploit for a linked CVE |
| EPSS | CVE-2026-55200: 0.5% (41.4th percentile) |
| Affected products | libssh2 project libssh2; curl project curl / libcurl (with libssh2 SCP/SFTP backend) |
| Weaknesses (CWE) | CWE-680, CWE-787, CWE-190 |
| MITRE ATT&CK techniques | T1059 Command and Scripting Interpreter, T1071 Application Layer Protocol, T1133 External Remote Services, T1190 Exploit Public-Facing Application, T1199 Trusted Relationship, T1203 Exploitation for Client Execution, T1210 Exploitation of Remote Services, T1211 Exploitation for Stealth, T1212 Exploitation for Credential Access, T1499 Endpoint Denial of Service, T1557 Adversary-in-the-Middle, T1573 Encrypted Channel and 4 more in the attack flow |
| Motivation | UNKNOWN |
| Target sectors | technology, telecommunications, manufacturing, energy, financial, government, embedded-iot |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 8 cited sources |
Detection coverage
As of 2026-06-24, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0931 across Splunk SPL, Microsoft KQL and Sigma, covering 20 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: libssh2 CVE-2026-55200 — Oversized Pre-Auth SSH packet_length During Key Exchange (Exploitation)
Detects the core CVE-2026-55200 exploitation signature: an inbound SSH binary packet whose 4-byte big-endian packet_length field exceeds LIBSSH2_PACKET_MAXPAYLOAD (262144) is delivered to a libssh2-based client during the pre-authentication transport/key-exchange phase. In the vulnerable code path this value (e.g. 0xffffffff) wraps the allocation arithmetic (4 + packet_length + mac_len + auth_len mod 2^32) and under-allocates the heap buffer, producing an out-of-bounds heap write. This rule correlates network IDS/Zeek packet-length telemetry with the SSH service to alert on anomalous key-exchange-phase packet sizes.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1190, T1203, T1557
- Data sources: zeek_ssh, suricata_ssh, network_ids, commonsecuritylog
- Severity: critical
- Confidence: high
Splunk SPL
index=network sourcetype="bro:ssh:json" OR sourcetype="suricata:ssh"
| eval pkt_len=coalesce(packet_length, ssh.packet_length, alert.packet_length)
| where isnotnull(pkt_len) AND pkt_len > 262144
| eval kex_phase=if(auth_attempts=0 OR isnull(auth_success), "pre-auth", "post-auth")
| search kex_phase="pre-auth"
| stats count min(_time) as first_seen max(_time) as last_seen values(server) as remote_ssh_endpoint values(pkt_len) as observed_packet_lengths by src_ip dest_ip
| where count >= 1
| eval signature="CVE-2026-55200 libssh2 oversized pre-auth packet_length (integer-overflow-to-OOB-write)"
| table first_seen last_seen src_ip dest_ip remote_ssh_endpoint observed_packet_lengths count signatureMicrosoft KQL
// Fallback KQL for environments mirroring Zeek/Suricata SSH logs into Sentinel
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DeviceProduct has_any ("Zeek", "Suricata", "Bro")
| where Protocol == "SSH" or DestinationPort == 22
| extend PacketLength = toint(extract(@"packet_length\"?\s*[:=]\s*(\d+)", 1, AdditionalExtensions))
| where PacketLength > 262144
| project TimeGenerated, SourceIP, DestinationIP, DestinationPort, PacketLength, DeviceProduct
| summarize Count=count(), MaxPacketLength=max(PacketLength), FirstSeen=min(TimeGenerated) by SourceIP, DestinationIPSigma
title: libssh2 CVE-2026-55200 Oversized SSH packet_length During Key Exchange
id: 6f3a1c2e-9d44-4b7a-8e21-0931a5b001cc
status: experimental
description: Detects an SSH binary packet with packet_length exceeding LIBSSH2_PACKET_MAXPAYLOAD during the pre-authentication key-exchange phase, the network signature of CVE-2026-55200 integer-overflow-to-heap-OOB-write in libssh2 ssh2_transport_read().
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-55200
- https://github.com/advisories/GHSA-r8mh-x5qv-7gg2
- https://github.com/libssh2/libssh2/pull/2052
author: Threadlinqs Team
date: 2026/06/24
tags:
- attack.initial_access
- attack.t1190
- attack.execution
- attack.t1203
- attack.collection
- attack.t1557
- cve.2026.55200
logsource:
category: network_connection
product: zeek
service: ssh
detection:
selection:
packet_length|gte: 262145
phase:
auth_success: false
condition: selection and phase
falsepositives:
- Misparsed or fragmented SSH frames in IDS reassembly
- Custom SSH tooling that legitimately negotiates very large payloads (rare)
level: criticalKnown false positives:
- IDS frame-reassembly artifacts producing inflated length fields
- Non-standard SSH implementations negotiating unusually large payloads
Tuning notes: Tune the 262144 threshold to your LIBSSH2_PACKET_MAXPAYLOAD build value; allowlist known internal SSH appliances that legitimately use large channel windows. If your IDS does not parse packet_length, deploy a Zeek script to extract the 4-byte big-endian length immediately after the SSH banner.
- libssh2 CVE-2026-55200 — Outbound SSH from libssh2-Linked Process (Exploitation Reach) · unlock with TL Creds
- libssh2 CVE-2026-55200 — Heap-Corruption Abend of SSH Client (Post-Exploitation) · unlock with TL Creds
- libssh2 CVE-2026-55200 — Internal Lateral SSH Over Encrypted Channel from Compromised Client (Lateral Movement) · unlock with TL Creds
- libssh2 CVE-2026-55200 — Integer-Wrap packet_length Signature on SSH Key Exchange (Exploitation) · unlock with TL Creds
- libssh2 CVE-2026-55200 — Linux SSH Client SIGSEGV/Heap-Abort During Key Exchange (Post-Exploitation) · unlock with TL Creds
- libssh2 CVE-2026-55200 — Malicious-Server Banner with Oversized First Packet (C2 / MITM Channel) · unlock with TL Creds
- libssh2 CVE-2026-55200 — SSH Client Crash / Heap Abort During Key Exchange (Post-Exploitation) · unlock with TL Creds
- libssh2 CVE-2026-55200 — Outbound SSH from libssh2 Client to Untrusted/External Endpoint (C2 / Lateral Movement) · unlock with TL Creds
Indicators of compromise
As of 2026-06-24, Threadlinqs Intelligence tracks 20 indicators of compromise for TL-2026-0931.
Sample indicators (3 of 20)
- File hash:
97acf3dfda80c91c3a8c9f2372546301d4a1a7a8 - File hash:
0c76580b200e2c42e710879f9a8da14e27d8856f - File hash:
943e45c7bd6f5ec3ec7bcf056e68b0b1ed77970b
Defanged, TLP:CLEAR. Full set of 20 indicators: unlock with TL Creds.
Technical analysis
All versions through libssh2 1.11.1 are affected; the fix was merged in commit 97acf3df (PR #2052).
CVE-2026-55200 is a critical (CVSS v4.0 9.2 / CVSS v3.1 8.1) memory-corruption vulnerability in libssh2, a widely embedded C library that implements the client side of the SSH-2 protocol and is bundled by curl/libcurl, backup utilities, network-management tooling, and a large number of IoT, router, NAS, and industrial-controller firmware images.
The defect lives in ssh2_transport_read() in transport.c. When libssh2 reads an incoming SSH binary packet it parses the 4-byte big-endian packet_length field but does not validate it against an internal maximum (LIBSSH2_PACKET_MAXPAYLOAD) before using it in allocation arithmetic. An attacker who controls the remote SSH endpoint (a malicious server that a libssh2 client connects to, or an on-path man-in-the-middle) can set packet_length to a very large value such as 0xffffffff. In the vulnerable allocation path the computed total (conceptually total_num = 4 + packet_length + mac_len + auth_len) wraps modulo 2^32 — for example 0xffffffff + 0 + 16 wraps to 15, so libssh2 allocates a tiny heap buffer (≈19 bytes) instead of the intended large region. Subsequent packet processing still references the original oversized packet_length and copies far more data than the undersized buffer can hold, producing an out-of-bounds heap write that corrupts adjacent heap structures.
Because the bug is reached during the SSH transport/key-exchange phase, exploitation occurs PRE-AUTHENTICATION with no credentials and no user interaction. The consequences range from a reliable denial of service (process crash) to potential remote code execution, depending on heap layout and platform; the upstream project addressed both a code-execution path (commit 97acf3df) and a related denial-of-service path (commit 1762685). A separate companion issue, CVE-2026-55199, was fixed in the same area.
The vulnerability was responsibly disclosed by security researcher Tristan Madani (@TristanInSec); the fix was implemented by contributor willco007 in PR #2052 and adds strict bounds checking that rejects packets whose packet_length exceeds the maximum allowed payload (returning LIBSSH2_ERROR_OUT_OF_BOUNDARY). At disclosure there was no confirmed in-the-wild exploitation and EPSS was low (~0.6% 30-day), but proof-of-concept components demonstrating the integer wrap and a controlled heap-exploitation harness were published, and the no-auth network vector makes this a high-priority patch for any product that statically links or bundles libssh2.
MITRE ATT&CK techniques by tactic:
Execution
T1059 Command and Scripting Interpreter; T1203 Exploitation for Client Execution
Command and Control
T1071 Application Layer Protocol; T1573 Encrypted Channel
Initial Access
T1133 External Remote Services; T1190 Exploit Public-Facing Application; T1199 Trusted Relationship
Lateral Movement
T1210 Exploitation of Remote Services
Defense Evasion
T1211 Exploitation for Stealth
Credential Access
T1212 Exploitation for Credential Access
Impact
T1499 Endpoint Denial of Service
Collection
Resource Development
T1583 Acquire Infrastructure; T1587 Develop Capabilities; T1588 Obtain Capabilities; T1608 Stage Capabilities
Remediation
Patches
- libssh2 fix commit 97acf3dfda80c91c3a8c9f2372546301d4a1a7a8 (merge of PR #2052)
- libssh2 DoS-path fix commit 1762685
- Distribution rebuilds bundling the patched libssh2 (e.g., Debian 1.11.1-3)
Immediate actions
- Inventory all software that statically links or bundles libssh2 (use ldd, strings, or SBOM tooling) and prioritize internet-facing and embedded systems.
- Update libssh2 to a build containing fix commits 97acf3df (RCE) and 1762685 (DoS); on Debian, the patched build is tracked as 1.11.1-3.
- Restrict and monitor outbound SSH/SCP/SFTP connections from libssh2-based clients to untrusted servers, since the bug triggers when connecting to attacker-controlled endpoints.
Workarounds
- Avoid initiating libssh2-based SSH/SCP/SFTP sessions to untrusted or unverified servers until patched.
- Apply network segmentation and egress filtering around hosts and devices that cannot be immediately updated.
- Where possible, route SSH through a hardened, patched jump host or proxy.
Longer-term hardening
- Maintain an SBOM and continuously track third-party library CVEs for transitively bundled components like libssh2.
- Deploy network monitoring/IDS rules that flag anomalously large SSH packet_length values during key exchange.
- Adopt memory-safety hardening (ASLR, heap hardening, compiler mitigations) for services that parse untrusted network input.
Affected and fixed versions
- libssh2 project — libssh2
Vulnerable versions: 0 through 1.11.1
Fixed in: commit 97acf3df (PR #2052); Debian 1.11.1-3 - curl project — curl / libcurl (with libssh2 SCP/SFTP backend)
Vulnerable versions: builds linking libssh2 <= 1.11.1
Fixed in: rebuild against patched libssh2
Timeline
- Contributor willco007 pushes and merges PR #2052 to libssh2 master adding bounds checking on packet_length; fix commits include 0c76580b, 943e45c7 and merge 97acf3df (credit to researcher Tristan Madani).
- Upstream feature branch for PR #2052 deleted after merge.
- Cyber Security News publishes the first public write-up describing the unchecked packet_length out-of-bounds heap write in ssh2_transport_read().
- CVE-2026-55200 publicly disclosed (CVSS v4.0 9.2 / v3.1 8.1, CWE-680); GitHub Advisory GHSA-r8mh-x5qv-7gg2 and VulnCheck advisory published; reported by Tristan Madani (@TristanInSec).
- Additional outlets (Cyber Kendra, GBHackers, CyberPress) report the zero-auth RCE affecting all libssh2 versions through 1.11.1.
- NVD record for CVE-2026-55200 last modified, confirming CVSS scoring and reference set.
- The CyberSec Guru publishes follow-up analysis framing CVE-2026-55200 as a critical libssh2 RCE flaw affecting all versions and urging downstream consumers (curl/libcurl, automation frameworks, file-transfer tools) to rebuild against the patched library.
- Detailed technical analysis published describing the integer-wrap arithmetic (0xffffffff+0+16 -> 15) and four PoC components (C11 arithmetic verifier, Python SSH trigger, C heap-exploitation harness, Python exploit driver).
- Distribution maintainers ship rebuilt packages bundling the patched libssh2 (e.g., Debian tracks the fixed build as 1.11.1-3); defenders advised to inventory SBOMs and prioritize patching internet-facing and embedded systems.
Sources cited
- NVD - CVE-2026-55200 NVD (NIST) · Advisory · 2026-06-17
- GitHub Advisory Database - GHSA-r8mh-x5qv-7gg2 GitHub · Advisory · 2026-06-17
- VulnCheck Advisory - libssh2 out-of-bounds write via unchecked packet length in transport.c vulncheck.com · Vendor report · 2026-06-17
- libssh2 fix commit 97acf3dfda80c91c3a8c9f2372546301d4a1a7a8 GitHub · Code repository · 2026-06-12
- libssh2 PR #2052 - Add additional bounds checking on packet length GitHub · Code repository · 2026-06-12
- Cyber Security News - libssh2 Vulnerability Lets Attackers Trigger Out-of-Bounds Heap Write (CVE-2026-55200) cybersecuritynews.com · News · 2026-06-17
- The CyberSec Guru - CVE-2026-55200: Critical libssh2 RCE Flaw Affects All Versions thecybersecguru.com · News · 2026-06-23
- Cyber Kendra - CVE-2026-55200 Critical libssh2 Flaw Enables Zero-Auth RCE cyberkendra.com · News · 2026-06-18
Other reports on CVE-2026-55200
Previous and next in vulnerability
Drafted by the Threadlinqs research pipeline from 8 sources; published ; last updated —.