# CVE-2026-0968: libssh heap out-of-bounds read in sftp_parse_longname

Source: https://junglewise.ai/threats/cve-2026-0968-libssh-heap-out-of-bounds-read-in-sftp-parse-longname  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-26. Updated: 2026-05-19  
License: CC BY 4.0 with a link back

CVE-2026-0968 · Severity: low · CVSS 3.1 · Published 2026-03-26

libssh is a library used by applications to provide secure file transfers and remote access. A vulnerability has been identified where a malicious file transfer (SFTP) server can send specially crafted data to a client using this library. This can cause the client application to crash or behave unexpectedly, potentially leading to a denial of service for the user.

Technologies: [Libssh](https://junglewise.ai/threats/technologies/libssh). Vendors: [Libssh](https://junglewise.ai/threats/vendors/libssh).

## Quick answers

**Is CVE-2026-0968 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-0968 being exploited in the wild.

**How severe is CVE-2026-0968?** Low severity, with a CVSS score of 3.1, published 26 March 2026.

**Which products and versions are affected?** Libssh up to and including 0.11.3.

**Is there a fix for CVE-2026-0968?** A patch was published on 2026-02-10: libssh versions 0.12.0 and 0.11.4 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-0968 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-0968?** Check whether you run Libssh at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A flaw exists in libssh's sftp_parse_longname() function due to a missing NULL check when processing the 'longname' field of an SSH_FXP_NAME message. During a file listing operation, a malicious SFTP server can provide a malformed field that triggers a heap out-of-bounds read. This vulnerability is classified as a NULL pointer dereference (CWE-476) leading to memory corruption. An attacker can achieve a denial of service (DoS) via application crash. The attack requires a user to connect to a compromised or malicious SFTP server. The issue is fixed in libssh versions 0.12.0 and 0.11.4.

## Affected products

- libssh libssh up to and including 0.11.3
- Red Hat Enterprise Linux 10 10.0
- Red Hat Enterprise Linux 9.0 9.0

## Timeline

- 2026-02-04: other: Reported to Red Hat Bugzilla
- 2026-02-10: patched: libssh versions 0.12.0 and 0.11.4 released
- 2026-03-26: disclosed: CVE published
- 2026-05-19: advisory: Red Hat security advisory RHSA-2026:18160 issued

## References

- [https://access.redhat.com/errata/RHSA-2026:18160](https://access.redhat.com/errata/RHSA-2026:18160)
- [https://access.redhat.com/security/cve/CVE-2026-0968](https://access.redhat.com/security/cve/CVE-2026-0968)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2436982](https://bugzilla.redhat.com/show_bug.cgi?id=2436982)
- [https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/](https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/)

## Related threats

- [libssh authentication bypass in GSSAPIKeyExchange](https://junglewise.ai/threats/cve-2026-59851-libssh-authentication-bypass-in-gssapikeyexchange)
- [libssh use-after-free in channel data callbacks](https://junglewise.ai/threats/cve-2026-59850-libssh-use-after-free-in-channel-data-callbacks)
- [libssh infinite loop in certificate-based authentication](https://junglewise.ai/threats/cve-2026-59849-libssh-infinite-loop-in-certificate-based-authentication)
- [libssh denial of service via memory exhaustion in SFTP client](https://junglewise.ai/threats/cve-2026-59848-libssh-denial-of-service-via-memory-exhaustion-in-sftp-client)
- [libssh integrity protection bypass in OpenSSL AES-GCM backend](https://junglewise.ai/threats/cve-2026-59847-libssh-integrity-protection-bypass-in-openssl-aes-gcm-backend)
