Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. paramiko
  4. ›
  5. CVE-2023-48795

CVE-2023-48795: Prefix Truncation Attack against ChaCha20-Poly1305 and Encrypt-then-MAC aka Terrapin

December 18, 2023 (updated January 29, 2024)

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, libssh before 0.10.6, libssh2 through 1.11.0, Thorn Tech SFTP Gateway before 3.4.6, Tera Term before 5.1, Paramiko before 3.4.0, jsch before 0.2.15, SFTPGo before 2.5.6, Netgate pfSense Plus through 23.09.1, Netgate pfSense CE through 2.7.2, HPN-SSH through 18.2.0, ProFTPD 1.3.9rc1, ORYX CycloneSSH before 2.3.4, NetSarang XShell 7 before Build 0144, CrushFTP before 10.6.0, ConnectBot SSH library before 2.2.22, the mscdex ssh2 module before 1.15.0 for Node.js, the thrussh library before 0.35.1 for Rust, and the Russh crate before 0.40.2 for Rust; 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
  • crates.io/crates/thrussh/versions
  • forum.netgate.com/topic/184941/terrapin-ssh-attack
  • git.libssh.org/projects/libssh.git/commit/?h=stable-0.10&id=10e09e273f69e149389b3e0e5d44b8c221c2e7f6
  • github.com/NixOS/nixpkgs/pull/275249
  • github.com/TeraTermProject/teraterm/commit/7279fbd6ef4d0c8bdd6a90af4ada2899d786eec0
  • github.com/TeraTermProject/teraterm/releases/tag/v5.1
  • github.com/advisories/GHSA-45x7-px36-x8w8
  • github.com/connectbot/sshlib/commit/5c8b534f6e97db7ac0e0e579331213aa25c173ab
  • github.com/connectbot/sshlib/compare/2.2.21...2.2.22
  • 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/jtesta/ssh-audit/commit/8e972c5e94b460379fe0c7d20209c16df81538a5
  • github.com/libssh2/libssh2/pull/1291
  • github.com/mkj/dropbear/blob/17657c36cce6df7716d5ff151ec09a665382d5dd/CHANGES
  • github.com/mscdex/ssh2/commit/97b223f8891b96d6fc054df5ab1d5a1a545da2a3
  • github.com/mwiede/jsch/compare/jsch-0.2.14...jsch-0.2.15
  • 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/proftpd/proftpd/blob/master/RELEASE_NOTES
  • github.com/proftpd/proftpd/issues/456
  • github.com/rapier1/hpn-ssh/releases
  • 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
  • nest.pijul.com/pijul/thrussh/changes/D6H7OWTTMHHX6BTB3B6MNBOBX2L66CBL4LGSEUSAI2MCRCJDQFRQC
  • news.ycombinator.com/item?id=38684904
  • news.ycombinator.com/item?id=38685286
  • nvd.nist.gov/vuln/detail/CVE-2023-48795
  • oryx-embedded.com/download/
  • 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.crushftp.com/crush10wiki/Wiki.jsp?page=Update
  • www.netsarang.com/en/xshell-update-history/
  • www.openssh.com/openbsd.html
  • www.openssh.com/txt/release-9.6
  • www.openwall.com/lists/oss-security/2023/12/18/2
  • www.paramiko.org/changelog.html
  • 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/

Code Behaviors & Features

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 →

Affected versions

All versions before 3.4.0

Fixed versions

  • 3.4.0

Solution

Upgrade to version 3.4.0 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-354: Improper Validation of Integrity Check Value

Source file

pypi/paramiko/CVE-2023-48795.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:15 +0000.