1. Archivio CVE
  2. 2025
  3. CVE-2025-68705

CVE-2025-68705

9.8 Gravità critica CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 9.8 – Critica

Descrizione

RustFS is a distributed object storage system built in Rust. In versions 1.0.0-alpha.13 to 1.0.0-alpha.78, RustFS contains a path traversal vulnerability in the /rustfs/rpc/read_file_stream endpoint. This issue has been patched in version 1.0.0-alpha.79.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
rustfs rustfs 1.0.0 alpha13 rust
rustfs rustfs 1.0.0 alpha14 rust
rustfs rustfs 1.0.0 alpha15 rust
rustfs rustfs 1.0.0 alpha16 rust
rustfs rustfs 1.0.0 alpha17 rust
rustfs rustfs 1.0.0 alpha18 rust
rustfs rustfs 1.0.0 alpha19 rust
rustfs rustfs 1.0.0 alpha20 rust
rustfs rustfs 1.0.0 alpha21 rust
rustfs rustfs 1.0.0 alpha22 rust
rustfs rustfs 1.0.0 alpha23 rust
rustfs rustfs 1.0.0 alpha24 rust
rustfs rustfs 1.0.0 alpha25 rust
rustfs rustfs 1.0.0 alpha26 rust
rustfs rustfs 1.0.0 alpha27 rust
rustfs rustfs 1.0.0 alpha28 rust
rustfs rustfs 1.0.0 alpha29 rust
rustfs rustfs 1.0.0 alpha30 rust
rustfs rustfs 1.0.0 alpha31 rust
rustfs rustfs 1.0.0 alpha32 rust
rustfs rustfs 1.0.0 alpha33 rust
rustfs rustfs 1.0.0 alpha34 rust
rustfs rustfs 1.0.0 alpha35 rust
rustfs rustfs 1.0.0 alpha36 rust
rustfs rustfs 1.0.0 alpha37 rust
rustfs rustfs 1.0.0 alpha38 rust
rustfs rustfs 1.0.0 alpha39 rust
rustfs rustfs 1.0.0 alpha40 rust
rustfs rustfs 1.0.0 alpha41 rust
rustfs rustfs 1.0.0 alpha42 rust
rustfs rustfs 1.0.0 alpha43 rust
rustfs rustfs 1.0.0 alpha44 rust
rustfs rustfs 1.0.0 alpha45 rust
rustfs rustfs 1.0.0 alpha46 rust
rustfs rustfs 1.0.0 alpha47 rust
rustfs rustfs 1.0.0 alpha48 rust
rustfs rustfs 1.0.0 alpha49 rust
rustfs rustfs 1.0.0 alpha50 rust
rustfs rustfs 1.0.0 alpha51 rust
rustfs rustfs 1.0.0 alpha52 rust
rustfs rustfs 1.0.0 alpha53 rust
rustfs rustfs 1.0.0 alpha54 rust
rustfs rustfs 1.0.0 alpha55 rust
rustfs rustfs 1.0.0 alpha56 rust
rustfs rustfs 1.0.0 alpha57 rust
rustfs rustfs 1.0.0 alpha58 rust
rustfs rustfs 1.0.0 alpha59 rust
rustfs rustfs 1.0.0 alpha60 rust
rustfs rustfs 1.0.0 alpha61 rust
rustfs rustfs 1.0.0 alpha62 rust
rustfs rustfs 1.0.0 alpha63 rust
rustfs rustfs 1.0.0 alpha64 rust
rustfs rustfs 1.0.0 alpha65 rust
rustfs rustfs 1.0.0 alpha66 rust
rustfs rustfs 1.0.0 alpha67 rust
rustfs rustfs 1.0.0 alpha68 rust
rustfs rustfs 1.0.0 alpha69 rust
rustfs rustfs 1.0.0 alpha70 rust
rustfs rustfs 1.0.0 alpha71 rust
rustfs rustfs 1.0.0 alpha72 rust
rustfs rustfs 1.0.0 alpha73 rust
rustfs rustfs 1.0.0 alpha74 rust
rustfs rustfs 1.0.0 alpha75 rust
rustfs rustfs 1.0.0 alpha76 rust
rustfs rustfs 1.0.0 alpha77 rust
rustfs rustfs 1.0.0 alpha78 rust
Tutte le 32 vulnerabilità di Rustfs

Tipo di vulnerabilità

CWE-22 Path traversal: percorso non limitato alla cartella consentita

Il prodotto costruisce il percorso di un file o di una cartella con dati provenienti dall’esterno, senza neutralizzare gli elementi speciali (come «../») che permettono di uscire dalla cartella a cui l’accesso dovrebbe essere limitato.

Impatto sui sistemi

AmbitoImpatto
Integrità, Riservatezza, Disponibilità Eseguire codice o comandi non autorizzati
Integrità Modificare file o cartelle
Riservatezza Leggere file o cartelle
Disponibilità Interruzione del servizio: arresto o riavvio

Come si previene

Sviluppo · Validazione dell’input Considera ogni input come potenzialmente malevolo. Adotta una validazione per «elenco di valori ammessi»: accetta solo gli input che rispettano rigorosamente le specifiche e rifiuta, o trasforma in qualcosa di conforme, tutto il resto. Nel validare considera tutte le proprietà rilevanti: lunghezza, tipo, intervallo dei valori ammessi, input mancanti o in più, sintassi, coerenza tra campi collegati e rispetto delle regole di business (per esempio «barca» è sintatticamente valido perché contiene solo lettere, ma non lo è se il campo deve contenere solo colori come rosso o blu). Non limitarti a cercare input malevoli o malformati: quasi certamente ne sfuggirà qualcuno, soprattutto se l’ambiente del codice cambia, lasciando all’attaccante lo spazio per aggirare la validazione. Le liste di valori vietati restano utili per rilevare possibili attacchi o scartare subito gli input più malformati. Per i nomi di file usa elenchi rigorosi dei caratteri ammessi. Se possibile, consenti un solo carattere «.» nel nome, per evitare errori come CWE-23, ed escludi i separatori di cartella come «/», per evitare CWE-36. Usa un elenco delle estensioni ammesse, utile anche contro CWE-434. Non affidarti solo a un filtro che rimuove i caratteri pericolosi: equivale a una lista di valori vietati, che può essere incompleta (CWE-184). Per esempio, filtrare «/» non basta se il file system accetta anche «\» come separatore; e un filtro applicato male può produrre comunque dati pericolosi (CWE-182): se si rimuovono in sequenza le occorrenze di «../» dalla stringa «.../...//», i caratteri rimasti formano di nuovo «../».
Architettura e progettazione Per ogni controllo di sicurezza eseguito lato client, ripeti lo stesso controllo lato server, per evitare CWE-602: un attaccante può aggirare i controlli del client modificando i valori dopo il controllo o eliminando del tutto i controlli dal client, e inviare poi al server i valori modificati.
Sviluppo · Validazione dell’input Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked. Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes .. sequences and symbolic links (CWE-23, CWE-59). This includes: realpath() in C getCanonicalPath() in Java GetFullPath() in ASP.NET realpath() or abs_path() in Perl realpath() in PHP
Architettura e progettazione · Librerie o framework Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
Esercizio · Firewall Usa un firewall applicativo (WAF) in grado di rilevare attacchi contro questo tipo di vulnerabilità. È utile quando il codice non può essere corretto (perché controllato da terzi), come misura d’emergenza in attesa di interventi più completi, o come difesa aggiuntiva.
Architettura e progettazione · Esercizio · Hardening dell’ambiente Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Architettura e progettazione · Conversione in valori ammessi When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. For example, ID 1 could map to inbox.txt and ID 2 could map to profile.txt. Features such as the ESAPI AccessReferenceMap provide this capability.
Architettura e progettazione · Esercizio · Sandbox o jail Esegui il codice in una «jail» o in una sandbox simile, che imponga confini rigidi tra il processo e il sistema operativo. Così si può limitare a quali file in una cartella si può accedere o quali comandi il software può eseguire (per esempio con chroot su Unix, AppArmor o SELinux). Il codice gestito può offrire una certa protezione: in Java, per esempio, java.io.FilePermission del SecurityManager permette di limitare le operazioni sui file. Non sempre è una soluzione praticabile e limita l’impatto solo sul sistema operativo: il resto dell’applicazione può comunque essere compromesso. Attenzione a CWE-243 e agli altri errori legati alle jail.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 11.301 CVE di tipo CWE-22, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org