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

CVE-2023-46446: AsyncSSH Rogue Session Attack

November 14, 2023 (updated December 22, 2023)

An issue in AsyncSSH v2.14.0 and earlier allows attackers to control the remote end of an SSH client session via packet injection/removal and shell emulation.

The rogue session attack targets any SSH client connecting to an AsyncSSH server, on which the attacker must have a shell account. The goal of the attack is to log the client into the attacker’s account without the client being able to detect this. At that point, due to how SSH sessions interact with shell environments, the attacker has complete control over the remote end of the SSH session. The attacker receives all keyboard input by the user, completely controls the terminal output of the user’s session, can send and receive data to/from forwarded network ports, and is able to create signatures with a forwarded SSH Agent, if any. The result is a complete break of the confidentiality and integrity of the secure channel, providing a strong vector for a targeted phishing campaign against the user. For example, the attacker can display a password prompt and wait for the user to enter the password, elevating the attacker’s position to a MitM at the application layer and enabling perfect shell emulation.

The attacks work by the attacker injecting a chosen authentication request before the client’s NewKeys. The authentication request sent by the attacker must be a valid authentication request containing his credentials. The attacker can use any authentication mechanism that does not require exchanging additional messages between client and server, such as password or publickey. Due to a state machine flaw, the AsyncSSH server accepts the unauthenticated user authentication request message and defers it until the client has requested the authentication protocol.

References

  • github.com/advisories/GHSA-c35q-ffpf-5qpm
  • github.com/ronf/asyncssh/commit/83e43f5ea3470a8617fc388c72b062c7136efd7e
  • github.com/ronf/asyncssh/security/advisories/GHSA-c35q-ffpf-5qpm

Code Behaviors & Features

Detect and mitigate CVE-2023-46446 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 2.14.1

Fixed versions

  • 2.14.1

Solution

Upgrade to version 2.14.1 or above.

Impact 6.8 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-639: Authorization Bypass Through User-Controlled Key

Source file

pypi/asyncssh/CVE-2023-46446.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:13 +0000.