CVE-2026-66034:
NixOS Análisis y mitigación de vulnerabilidades
Vista general
CVE-2026-66034 is a missing bounds check vulnerability in libssh2's publickey subsystem that allows a malicious SSH server to trigger an arbitrary-length heap out-of-bounds read and a free of an uninitialized pointer. It affects libssh2 through version 1.11.1 and was fixed in commit a13bb6c. The vulnerability was disclosed on July 24, 2026, and was reported by Vladimir Eli Tokarev. It carries a CVSS v3.1 base score of 7.5 (High) and a CVSS v4.0 base score of 7.7 (High) (Github Advisory, Red Hat Bugzilla).
Técnicas
The root cause is a missing bounds check (CWE-125: Out-of-bounds Read; CWE-908: Use of Uninitialized Resource) in the libssh2_publickey_list_fetch() function within src/publickey.c. Specifically, the version 1 response parser reads a server-controlled comment_len value and advances the parse pointer without first verifying that sufficient bytes remain in the buffer. This allows an attacker-controlled SSH server to cause an arbitrary-length heap out-of-bounds read, leaking heap pointers from adjacent memory allocations and defeating ASLR. Subsequently, the error cleanup path frees an uninitialized pointer from a non-zeroed realloc() region, corrupting heap allocator state. The fix, merged in commit a13bb6c, adds a bounds check ensuring pkey->listFetch_s + comment_len does not exceed the end of listFetch_data before proceeding (Github Advisory, Fix Commit).
Impacto
Successful exploitation allows a malicious SSH server to leak heap memory contents from the connecting client process, exposing heap pointers that can be used to defeat ASLR protections. The subsequent free of an uninitialized pointer corrupts heap allocator state, which can lead to memory corruption, application crashes (denial of service), or potentially arbitrary code execution on the client. The confidentiality, integrity, and availability impacts are all rated High, as sensitive data in heap memory (such as cryptographic material or credentials) may be exposed, and the heap corruption may be leveraged for further exploitation (Github Advisory, Red Hat Bugzilla).
Pasos de explotación
- Set up a malicious SSH server: The attacker deploys a rogue SSH server (e.g., using a custom SSH implementation or modified OpenSSH) that responds to publickey subsystem requests with crafted version 1 responses.
- Lure the victim client: The attacker tricks a user or automated process running a libssh2-based SSH client (version ≤ 1.11.1) into connecting to the malicious server — for example, via phishing, DNS spoofing, BGP hijacking, or a man-in-the-middle position.
- Trigger publickey subsystem interaction: The attacker's server responds to the client's
libssh2_publickey_list_fetch()call with a crafted response containing an oversizedcomment_lenvalue in the version 1 response parser. - Induce out-of-bounds read: Because no bounds check is performed, the client reads beyond the allocated buffer, leaking heap memory contents (including pointers from adjacent allocations) back to the attacker, defeating ASLR.
- Trigger heap corruption: The error cleanup path in the client frees an uninitialized pointer from a non-zeroed
realloc()region, corrupting heap allocator state and potentially enabling further memory corruption primitives. - Leverage for further exploitation: Using the leaked heap pointers to defeat ASLR, the attacker may chain additional vulnerabilities to achieve arbitrary code execution on the client system (Github Advisory, Fix Commit).
Indicadores de compromiso
- Network: Unexpected or unsolicited SSH connections from client systems to unknown or untrusted SSH server IP addresses; SSH sessions to servers not in the organization's approved inventory.
- Process: libssh2-linked applications (e.g.,
curl,git,sftpclients, custom tools) crashing unexpectedly with segmentation faults or heap corruption errors after connecting to an SSH server. - Logs: Application crash logs or core dumps referencing
libssh2_publickey_list_fetch()orpublickey.c; error messages such asLIBSSH2_ERROR_BUFFER_TOO_SMALLorListFetch data too shortin pre-patched versions (post-patch these indicate a blocked attempt). - File System: Unexpected core dump files (
core.*) generated by libssh2-linked processes in working directories or/var/crash/.
Mitigación y soluciones alternativas
The fix is available in commit a13bb6c of the libssh2 repository; users should update to a version of libssh2 that includes this commit or later (Fix Commit, Fix PR). Red Hat has issued an advisory (RHSA-2026:46927) for affected Red Hat products (Red Hat Advisory). As a workaround where patching is not immediately possible, avoid connecting to untrusted or unknown SSH servers, and implement strict SSH server validation and certificate pinning where feasible. Organizations using libssh2 as a dependency in third-party software should check with their vendors for updated packages.
Reacciones de la comunidad
The vulnerability received coverage from multiple security news outlets, including CyberPress, CyberSecurityNews, SecurityOnline, and UnderCodeNews, which highlighted the risk to millions of SSH connections (CyberPress, CyberSecurityNews, UnderCodeNews). Red Hat tracked the issue via Bugzilla and issued a security errata, indicating active downstream response (Red Hat Bugzilla). The Yocto Project security mailing list also flagged the issue for embedded Linux users (Yocto Security List). Community discussion noted the vulnerability was part of a broader set of libssh2 security issues discovered in late July 2026.
Recursos adicionales
Fuente: Este informe se generó utilizando IA
Relacionado NixOS Vulnerabilidades:
Evaluación gratuita de vulnerabilidades
Compare su postura de seguridad en la nube
Evalúe sus prácticas de seguridad en la nube en 9 dominios de seguridad para comparar su nivel de riesgo e identificar brechas en sus defensas.
Recursos adicionales de Wiz
Obtén una demostración personalizada
¿Listo para ver a Wiz en acción?
"La mejor experiencia de usuario que he visto en mi vida, proporciona una visibilidad completa de las cargas de trabajo en la nube."
"Wiz proporciona un panel único para ver lo que ocurre en nuestros entornos en la nube."
"Sabemos que si Wiz identifica algo como crítico, en realidad lo es."