Rogue Session Attack in AsyncSSH: Control Over SSH Client Sessions

python-asyncssh Updated 02 Oct 2025

Summary

14/11/2023
N/A
Yes i
Medium
6.8

CVE-2023-46446: An issue in AsyncSSH before 2.14.1 allows attackers to control the remote end of an SSH client session via packet injection/removal and shell emulation, aka a "Rogue Session Attack.". Affects python-asyncssh across 2 version ranges.

< 0d6de9aec1a81a4f6ff7400c24b699eb6137fba3 < 2.5.0-0.1+deb11u1

Fixed in 2.5.0-0.1+deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

AsyncSSH is a Python library that provides an asynchronous SSH client and server implementation. It is widely used for secure shell access and file transfers in Python applications. The library supports various SSH features, including key exchange, authentication, and encryption. However, a vulnerability has been identified that allows attackers to manipulate SSH client sessions, posing significant security risks.

Vulnerability Detail

An issue in AsyncSSH before version 2.14.1 allows attackers to perform a Rogue Session Attack. This vulnerability enables them to control the remote end of an SSH client session through packet injection or removal and shell emulation. The potential ramifications include unauthorized access to sensitive data, manipulation of commands, and disruption of services. The vulnerability arises from insufficient validation of incoming packets, which can be exploited by an attacker to hijack an active session.

How To Fix

Minimum fixed version

2.5.0-0.1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-asyncssh

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can implement network-level controls to restrict access to SSH services only from trusted IP addresses. Additionally, using SSH key-based authentication instead of password-based authentication can help mitigate risks until the library is updated.

Conclusion

The vulnerability in AsyncSSH poses a significant risk to SSH client sessions, allowing attackers to hijack sessions through packet manipulation. Users are strongly advised to upgrade to the latest version to protect against this threat. Implementing temporary workarounds can also help mitigate risks until the upgrade is completed.

See every vulnerability recorded for python-asyncssh →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.8, indicating a medium severity level.

AsyncSSH versions prior to 2.14.1 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The potential impacts include unauthorized access to SSH sessions, data manipulation, and service disruptions.

Yes, implementing network-level controls and using SSH key-based authentication can help mitigate risks until the library is updated.

Related vulnerabilities

Recent vulnerabilities recorded for python-asyncssh.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.5.0-0.1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-asyncssh

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback