CVE-2023-48795: Russh vulnerable to Prefix Truncation Attack against ChaCha20-Poly1305 and Encrypt-then-MAC
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remote attackers to bypass integrity checks such that some packets are omitted (from the extension negotiation message), and a client and server may consequently end up with a connection for which some security features have been downgraded or disabled, aka a Terrapin attack. This occurs because the SSH Binary Packet Protocol (BPP), implemented by these extensions, mishandles the handshake phase and mishandles use of sequence numbers. For example, there is an effective attack against SSH’s use of ChaCha20-Poly1305 (and CBC with Encrypt-then-MAC). The bypass occurs in chacha20-poly1305@openssh.com and (if CBC is used) the -etm@openssh.com MAC algorithms. This also affects Maverick Synergy Java SSH API before 3.1.0-SNAPSHOT, Dropbear through 2022.83, Ssh before 5.1.1 in Erlang/OTP, PuTTY before 0.80, AsyncSSH before 2.14.2, golang.org/x/crypto before 0.17.0, and libssh before 0.10.6; and there could be effects on Bitvise SSH through 9.31.
References
- www.openwall.com/lists/oss-security/2023/12/18/3
- access.redhat.com/security/cve/cve-2023-48795
- bugs.gentoo.org/920280
- bugzilla.redhat.com/show_bug.cgi?id=2254210
- bugzilla.suse.com/show_bug.cgi?id=1217950
- git.libssh.org/projects/libssh.git/commit/?h=stable-0.10&id=10e09e273f69e149389b3e0e5d44b8c221c2e7f6
- github.com/TeraTermProject/teraterm/commit/7279fbd6ef4d0c8bdd6a90af4ada2899d786eec0
- github.com/advisories/GHSA-45x7-px36-x8w8
- github.com/drakkan/sftpgo/releases/tag/v2.5.6
- github.com/erlang/otp/blob/d1b43dc0f1361d2ad67601169e90a7fc50bb0369/lib/ssh/doc/src/notes.xml
- github.com/erlang/otp/releases/tag/OTP-26.2.1
- github.com/golang/crypto/commit/9d2ee975ef9fe627bf0a6f01c1f69e8ef1d4f05d
- github.com/mkj/dropbear/blob/17657c36cce6df7716d5ff151ec09a665382d5dd/CHANGES
- github.com/mwiede/jsch/issues/457
- github.com/mwiede/jsch/pull/461
- github.com/openssh/openssh-portable/commits/master
- github.com/paramiko/paramiko/issues/2337
- github.com/ronf/asyncssh/blob/develop/docs/changes.rst
- github.com/ronf/asyncssh/tags
- github.com/warp-tech/russh/commit/1aa340a7df1d5be1c0f4a9e247aade76dfdd2951
- github.com/warp-tech/russh/releases/tag/v0.40.2
- github.com/warp-tech/russh/security/advisories/GHSA-45x7-px36-x8w8
- gitlab.com/libssh/libssh-mirror/-/tags
- go.dev/cl/550715
- go.dev/issue/64784
- groups.google.com/g/golang-announce/c/-n5WqVC18LQ
- groups.google.com/g/golang-announce/c/qA3XtxvMUyg
- jadaptive.com/important-java-ssh-security-update-new-ssh-vulnerability-discovered-cve-2023-48795/
- matt.ucc.asn.au/dropbear/CHANGES
- news.ycombinator.com/item?id=38684904
- news.ycombinator.com/item?id=38685286
- nvd.nist.gov/vuln/detail/CVE-2023-48795
- security-tracker.debian.org/tracker/CVE-2023-48795
- security-tracker.debian.org/tracker/source-package/libssh2
- security-tracker.debian.org/tracker/source-package/proftpd-dfsg
- thorntech.com/cve-2023-48795-and-sftp-gateway/
- twitter.com/TrueSkrillor/status/1736774389725565005
- ubuntu.com/security/CVE-2023-48795
- www.bitvise.com/ssh-server-version-history
- www.chiark.greenend.org.uk/~sgtatham/putty/changes.html
- www.openssh.com/openbsd.html
- www.openssh.com/txt/release-9.6
- www.openwall.com/lists/oss-security/2023/12/18/2
- www.reddit.com/r/sysadmin/comments/18idv52/cve202348795_why_is_this_cve_still_undisclosed/
- www.suse.com/c/suse-addresses-the-ssh-v2-protocol-terrapin-attack-aka-cve-2023-48795/
- www.terrapin-attack.com/
Detect and mitigate CVE-2023-48795 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →