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.
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
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| ronf | asyncssh | < 2.24.1 | — |
Riferimenti
- Riferimentohttps://github.com/ronf/asyncssh/commit/d4fc430d37b234cb35f1ba2cca834b2dbe1302cf
- Riferimentohttps://github.com/ronf/asyncssh/releases/tag/v2.24.1
- Riferimentohttps://github.com/ronf/asyncssh/security/advisories/GHSA-w29m-45fc-22v9
- Riferimentohttps://github.com/ronf/asyncssh/security/advisories/GHSA-w29m-45fc-22v9