asyncssh is vulnerable to Race Condition (TOCTOU)
64
Medium Risk
_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.
You are affected if you are using a version that falls within the vulnerable range.
asyncssh is vulnerable to Race Condition (TOCTOU) in versions 1.12.0 - 2.24.0.
Upgrade the asyncssh library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

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.