#1142537 libssh: CVE-2026-15370 CVE-2026-59842 CVE-2026-59843 CVE-2026-59844 CVE-2026-59845 CVE-2026-59846 CVE-2026-59847 CVE-2026-59848 CVE-2026-59849 CVE-2026-59850 CVE-2026-59851

Package:
src:libssh
Source:
src:libssh
Submitter:
Salvatore Bonaccorso
Date:
2026-08-03 15:49:03 UTC
Severity:
normal
Tags:
#1142537#5
Date:
2026-07-21 12:38:08 UTC
From:
To:
Hi,

The following vulnerabilities were published for libssh.

Making a RC bug due to the amount of CVEs mainly and two CVEs only
relevant for 0.12.0. We still need to assess the rest for trixie.

CVE-2026-15370[0]:
| A flaw was found in libssh. During SFTP server directory listing,
| the longname field is constructed with unsafe concatenation into a
| fixed-size stack buffer. When a client causes the server to list
| attacker-controlled filenames, sufficiently long names can overflow
| that stack buffer and may lead to crashes or possible code execution
| on the server.


CVE-2026-59842[1]:
| A flaw was found in libssh. During server-side GSSAPI key exchange,
| a client-supplied Curve25519 public key shorter than the expected
| length is copied without proper length validation, leading to an
| out-of-bounds heap read. This could allow a remote unauthenticated
| attacker to disclose small amounts of server memory.


CVE-2026-59843[2]:
| A flaw was found in libssh. A remote authenticated peer can
| advertise a zero maximum packet size in SSH_MSG_CHANNEL_OPEN,
| causing later channel writes to loop indefinitely and consume CPU,
| leading to denial of service.

Can you help on this one to identify the needed upstream change? There
is one from master branch referenced in the advisory but that does not
look to be backported to libssh-0.12.1?


CVE-2026-59844[3]:
| A flaw was found in libssh. A remote authenticated client can issue
| SSH_FXP_READ requests with an arbitrarily large length, causing a
| libssh SFTP server to allocate excessive memory and potentially
| exhaust it through repeated requests.


CVE-2026-59845[4]:
| A flaw was found in libssh. When ProxyCommand is used, an unchecked
| fork() failure can be stored as process ID -1; during cleanup,
| signals may then be sent across the caller's accessible process
| tree, leading to local denial of service.


CVE-2026-59846[5]:
| Information disclosure via ProxyCommand %r username expansion


CVE-2026-59847[6]:
| Integrity downgrade via OpenSSL AES-GCM tag verification


CVE-2026-59848[7]:
| Denial of service via SFTP responses with unknown request IDs


CVE-2026-59849[8]:
| Denial of service via automatic certificate authentication loop


CVE-2026-59850[9]:
| Use-after-free via data callbacks on closed channels


CVE-2026-59851[10]:
| Authentication bypass via missing GSSAPI principal check


If you fix the vulnerabilities please also make sure to include the
CVE (Common Vulnerabilities & Exposures) ids in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2026-15370
https://www.cve.org/CVERecord?id=CVE-2026-15370
[1] https://security-tracker.debian.org/tracker/CVE-2026-59842
https://www.cve.org/CVERecord?id=CVE-2026-59842
[2] https://security-tracker.debian.org/tracker/CVE-2026-59843
https://www.cve.org/CVERecord?id=CVE-2026-59843
[3] https://security-tracker.debian.org/tracker/CVE-2026-59844
https://www.cve.org/CVERecord?id=CVE-2026-59844
[4] https://security-tracker.debian.org/tracker/CVE-2026-59845
https://www.cve.org/CVERecord?id=CVE-2026-59845
[5] https://security-tracker.debian.org/tracker/CVE-2026-59846
https://www.cve.org/CVERecord?id=CVE-2026-59846
[6] https://security-tracker.debian.org/tracker/CVE-2026-59847
https://www.cve.org/CVERecord?id=CVE-2026-59847
[7] https://security-tracker.debian.org/tracker/CVE-2026-59848
https://www.cve.org/CVERecord?id=CVE-2026-59848
[8] https://security-tracker.debian.org/tracker/CVE-2026-59849
https://www.cve.org/CVERecord?id=CVE-2026-59849
[9] https://security-tracker.debian.org/tracker/CVE-2026-59850
https://www.cve.org/CVERecord?id=CVE-2026-59850
[10] https://security-tracker.debian.org/tracker/CVE-2026-59851
https://www.cve.org/CVERecord?id=CVE-2026-59851

Regards,
Salvatore

#1142537#10
Date:
2026-07-26 14:39:35 UTC
From:
To:
Hello Salvatore,

Salvatore Bonaccorso [2026-07-21 14:38 +0200]:

As usual, I'd recommend uploading 0.11.5 to trixie. The upstream stable
releases are well curated and tested. The previous two rounds were missed
though -- I prepared them for -security, then you said you marked them as
"wontfix" for stable-security, but I never got the "go!" for the stable-pu
request. Can't find the old bugs now, but "something" went wrong/got lost.

I'll prepare/test it in the next days.

This was indeed forgotten. It's present on the 0.11 branch. I notified the
maintainers by email and also created a corresponding unit test. I backported
the fix as a patch in the 0.12.1 upload.

Martin

#1142537#17
Date:
2026-08-01 12:06:47 UTC
From:
To:
Hello Salvatore!

Salvatore Bonaccorso [2026-07-21 14:38 +0200]:

Sorry for the delay! Life.. But the fixes have been in unstable for about a
week, and in testing since yesterday, and I got no complaints. autopkgtests
were happy as well.

This does not apply to trixie and earlier. Fix is
https://git.libssh.org/projects/libssh.git/commit/?id=ed9109dfc64b92c250b7e8c4c2045dad30d433f8

and that code was introduced in the 0.12 series, i.e. not present in 0.11 and
earlier.
https://git.libssh.org/projects/libssh.git/commit/?id=a45d20b75278858a6f06364722e068b32f181197

kex-gss.cs does not exist in 0.11 and ealier.

The others are fixed in 0.11.5. I packaged and tested it, ran autopkgtest, and
put it on

https://people.debian.org/~mpitt/tmp/

Note that this includes (and the above dir still separately contains) the
previous 0.11.4 which was declined for -security and never accepted into
updates.

debdiff to current trixie-security is at
https://people.debian.org/~mpitt/tmp/libssh_0.11.2-1+deb13u1_0.11.5-0+deb13u1.debdiff

Thanks!

Pitti

#1142537#22
Date:
2026-08-01 18:37:00 UTC
From:
To:
Hi Martin,

Thank you, please upload to security-master (needs to be built with
-sa).

Regards,
Salvatore

#1142537#27
Date:
2026-08-01 19:36:51 UTC
From:
To:
Hello Salvatore,

Salvatore Bonaccorso [2026-08-01 20:37 +0200]:

Done, thanks for all your security update work! 🤗

Pitti

#1142537#32
Date:
2026-08-03 15:48:16 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
libssh, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1142537@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Pitt <mpitt@debian.org> (supplier of updated libssh package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 01 Aug 2026 13:42:11 +0200
Source: libssh
Architecture: source
Version: 0.11.5-0+deb13u1
Distribution: trixie-security
Urgency: medium
Maintainer: Laurent Bigonville <bigon@debian.org>
Changed-By: Martin Pitt <mpitt@debian.org>
Closes: 1127693 1142537
Changes:
 libssh (0.11.5-0+deb13u1) trixie-security; urgency=medium
 .
   * New upstream security/bug fix release 0.11.4:
     - CVE-2026-0964: SCP Protocol Path Traversal in ssh_scp_pull_request()
     - CVE-2026-0965: Possible Denial of Service when parsing unexpected
       configuration files
     - CVE-2026-0966: Buffer underflow in ssh_get_hexa() on invalid input
     - CVE-2026-0967: Specially crafted patterns could cause DoS
     - CVE-2026-0968: OOB Read in sftp_parse_longname()
     - CVE-2026-3731: Read buffer overrun when handling SFTP extensions
     - Note: CVE-2025-14821 is Windows specific, does not apply to Linux
https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/
     (Closes: #1127693)
   * New upstream security/bug fix release 0.11.5:
     - CVE-2026-15370: Stack buffer overflow in SFTP server longname
       construction
     - CVE-2026-59843: Denial of service via zero advertised channel packet
       size
     - CVE-2026-59844: Denial of service via oversized SFTP read length
     - CVE-2026-59845: Denial of service via unchecked ProxyCommand fork()
       failure
     - CVE-2026-59846: Information disclosure via ProxyCommand %r username
       expansion
     - CVE-2026-59847: Integrity downgrade via OpenSSL AES-GCM tag verification
     - CVE-2026-59848: Denial of service via SFTP responses with unknown
       request IDs
     - CVE-2026-59849: Denial of service via automatic certificate
       authentication loop
     - CVE-2026-59850: Use-after-free via data callbacks on closed channels
     - Zero-initialize every ssh_string
https://www.libssh.org/2026/07/21/libssh-0-12-1-and-0-11-5-security-releases/
     (Closes: #1142537)
Checksums-Sha1:
 2087dc4964630a8390271bf4168f8091174e0573 2371 libssh_0.11.5-0+deb13u1.dsc
 004929095e3d23cfb3d999bec7779362afea9e73 629716 libssh_0.11.5.orig.tar.xz
 30146aedb82f2b3790a117c21bebdea05b063e04 31932 libssh_0.11.5-0+deb13u1.debian.tar.xz
 7533bd519a94a351f5601b9babbf9d82f5acf448 8085 libssh_0.11.5-0+deb13u1_source.buildinfo
Checksums-Sha256:
 8aeaec786998691f4a2a320ae66943d3fa324882465d2a91f62658a13cd7bcff 2371 libssh_0.11.5-0+deb13u1.dsc
 6898ba9dd836d618b71dc7a4bb786a502c173cef5cafbf20fe5e0567ba4ea30c 629716 libssh_0.11.5.orig.tar.xz
 00576a30d068e87813f96b1b8405d249d7fdaf75b9e61c5af775910dc15022fd 31932 libssh_0.11.5-0+deb13u1.debian.tar.xz
 5bc098fe907fae7fd6a6cf9d1dc7d94a5ef4c348cbb73e5c1fc489da4dfac847 8085 libssh_0.11.5-0+deb13u1_source.buildinfo
Files:
 6d954a139c57a013b8c955c7f576cb58 2371 libs optional libssh_0.11.5-0+deb13u1.dsc
 73aaa09a07041c6ec85b154cbcf604c3 629716 libs optional libssh_0.11.5.orig.tar.xz
 7388f83349450388d6cae899b1059c92 31932 libs optional libssh_0.11.5-0+deb13u1.debian.tar.xz
 270d452d8e4fe75f9f3a7b74904394ab 8085 libs optional libssh_0.11.5-0+deb13u1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEbEuHi35jHxYFV8PN7nvd5LhrVxMFAmpuSoYACgkQ7nvd5Lhr
VxM1TA//ZzzSSGg3N+ZXXGyE6NXDuo8QYJu6FtQz+wg5EGIOGojrpZzPorlzQns9
xmj7xidBx8T1M2fnJf+PA4i8iT/P1ZzfXqOOZJYBHeUR4euW1TaxOcrgPjeaTEeo
jByYWX86FIIfGStutlAUIJUz77Lvf03rup2hY0ew3Cxj7z8/wFEnQ7zBxp6HbRlE
4v6ZFld8r/Bj7a/9O+YuCL0cA1E2QcUIoMqtibEatLKbmHD/guhNs1V9cfvcSEBh
+mkU1cTyKNFB8wlG+HC4VGrFpow01stdu/1Vl6fYd6nXhcmjd//gosvK0PNa/e0+
gAY12pdlxioSaOoJe3lpnIl0AjC7X8cCXOv+9eZIkJ1fRpikV4eX068Y+Y92TdWC
hGbgUxTSFSx0plvGhkkjLMq6p+f4ArQBqLc7TKSZpP3lfeCr4YmMSKkxs+hKzQCb
Wm5Or26CCqW/uAyDL2c/duWaLpLtb0R9LL5E08gNLqYrgN3HfSFkcN4w3eVPfjq4
JdKdVR22QaWlJAaKcAMyzLfsSi/kC2QR3Td3XbCZTW6mqZ3kZ21FJ3B6GLwy6ku5
tpynFbuupiRGCZMNRfRaH+6otfOftec0So9DAmaann8Yln8DzxDRL5xAvcGPkza3
8ppL0RzYX/j5onShhwpFonPlPWwFvnBt6vdLQg2BgFyz7A0R/E4=
=CuaC
-----END PGP SIGNATURE-----