asyncssh is vulnerable to Race Condition (TOCTOU)
64
CVE Score
Medium
Race Condition (TOCTOU)
_process_userauth_request() in asyncssh/connection.py passes each SSH_MSG_USERAUTH_REQUEST to _finish_userauth() through a detached create_task() call, so a new request can run before the previous one finishes. A new request sets _username while the earlier attempt is still running, and that earlier attempt can still report success, so the server records the wrong username as the authenticated user. The fix cancels the previous attempt and accepts success only from the attempt that is still active.
Upgrade the asyncssh library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
1.12.0 - 2.24.0
Fixed in 2.24.1asyncssh is vulnerable to Race Condition (TOCTOU) in versions 1.12.0 - 2.24.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.