Descrizione

AsyncSSH is a Python package which provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework. Prior to 2.24.1, SFTPServer.map_path() uses posixpath.normpath() on a client-supplied path and removes only one leading slash before passing the result to posixpath.join() with the configured chroot. An authenticated SFTP user can supply a path beginning with exactly two slash characters, causing POSIX normalization to preserve the double-leading-slash form and the subsequent join to treat the remaining pathname as absolute. This bypasses the SFTP chroot and permits reads and writes with the operating-system permissions of the account running the server, which may enable code execution depending on writable targets. This issue is fixed in version 2.24.1.

Testo originale del record CVE (in inglese).

Come correggere

Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.8.

Versioni da aggiornare

  • ronf asyncssh: vulnerabile la versione < 2.24.1 → installare l'ultima release supportata dal vendor.

Mitigazioni temporanee

Da applicare solo se non è possibile aggiornare subito:

  • Filtrare le sequenze di path traversal sul reverse proxy/WAF ed eseguire il servizio con permessi minimi sul filesystem.

Verifica

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Configurazioni interessate

VendorProdottoVersioni vulnerabiliCorretta in
ronf asyncssh < 2.24.1 —

Riferimenti