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

CVE-2025-55423

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

A command injection vulnerability exists in the upnp_relay() function in multiple ipTIME router models because the controlURL value used to pass port-forwarding information to an upper router is passed to system() without proper validation or sanitization, allowing OS command injection.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
iptime a1 firmware >= 9.96.8 <= 10.07.4 –
iptime a1004 firmware >= 9.90.8 <= 12.16.2 –
iptime a1004ns firmware >= 9.96.0 <= 12.16.2 –
iptime a1004v firmware >= 9.90.8 <= 12.16.2 –
iptime a104 firmware >= 9.90.8 <= 10.03.8 –
iptime a104ns firmware >= 9.96.0 <= 12.16.2 –
iptime a104r firmware >= 9.90.8 <= 10.07.4 –
iptime a104r firmware tutte –
iptime a2003mu firmware >= 12.13.0 <= 12.16.2 –
iptime a2003ns-mu firmware >= 10.00.6 <= 12.16.2 –
iptime a2004 firmware >= 9.90.8 <= 10.07.4 –
iptime a2004mu firmware >= 10.08.6 <= 12.17.0 –
iptime a2004ns firmware >= 9.90.8 <= 11.00.4 –
iptime a2004ns-mu firmware >= 10.08.6 <= 12.17.0 –
iptime a2004ns-r firmware >= 9.90.8 <= 11.00.4 –
iptime a2004nsplus firmware >= 9.90.8 <= 11.00.4 –
iptime a2004plus firmware >= 9.90.8 <= 10.07.4 –
iptime a2004r firmware >= 9.90.8 <= 10.07.4 –
iptime a2004se firmware >= 14.16.6 <= 14.19.4 –
iptime a2008 firmware >= 9.90.8 <= 10.07.4 –
iptime a3 firmware >= 9.97.2 <= 10.07.2 –
iptime a3002mesh firmware >= 12.05.4 <= 14.19.4 –
iptime a3003ns firmware >= 9.99.8 <= 11.00.4 –
iptime a3004 firmware >= 9.90.8 <= 10.08.2 –
iptime a3004-dual firmware >= 9.90.4 <= 10.07.2 –
iptime a3004m firmware >= 14.18.4 <= 14.19.4 –
iptime a3004ns firmware >= 9.90.2 <= 10.09.4 –
iptime a3004ns-bcm firmware >= 9.95.8 <= 11.00.4 –
iptime a3004ns-dual firmware >= 9.90.4 <= 12.09.4 –
iptime a3004ns-m firmware >= 10.05.4 <= 14.19.4 –
iptime a3004t firmware >= 12.10.2 <= 14.19.4 –
iptime a3004tw firmware >= 14.15.2 <= 14.19.4 –
iptime a3008-mu firmware >= 10.08.4 <= 14.19.4 –
iptime a304 firmware >= 10.05.4 <= 10.07.4 –
iptime a5004ns firmware >= 9.90.2 <= 11.00.4 –
iptime a5004ns-m firmware >= 10.05.4 <= 14.19.4 –
iptime a6004mx firmware >= 12.04.6 <= 14.19.4 –
iptime a6004ns firmware >= 9.90.2 <= 11.00.4 –
iptime a6004ns-m firmware >= 9.99.8 <= 14.19.4 –
iptime a604 firmware >= 9.90.8 <= 12.06.6 –
iptime a604-v3 firmware >= 10.01.6 <= 10.07.2 –
iptime a604-v5 firmware >= 10.09.2 <= 12.16.2 –
iptime a604g-mu firmware >= 10.07.4 <= 12.16.2 –
iptime a604g-skylife firmware >= 12.02.4 <= 12.12.4 –
iptime a604m firmware >= 10.06.4 <= 10.07.2 –
iptime a604mu firmware >= 12.12.4 <= 12.16.2 –
iptime a604r firmware >= 10.09.2 <= 12.16.2 –
iptime a604se firmware >= 14.17.2 <= 14.19.4 –
iptime a604v firmware >= 9.90.8 <= 10.07.4 –
iptime a6ns-m firmware >= 10.01.6 <= 14.19.4 –
iptime a7004m firmware >= 10.06.8 <= 14.19.4 –
iptime a704ns-bcm firmware >= 9.95.8 <= 11.00.4 –
iptime a7ns firmware >= 9.96.0 <= 11.00.4 –
iptime a8004bcm firmware >= 11.99.1 <= 12.16.2 –
iptime a8004itl firmware >= 11.00.4 <= 14.19.4 –
iptime a8004ns-m firmware >= 9.99.2 <= 14.19.4 –
iptime a8004t firmware >= 10.06.8 <= 14.19.4 –
iptime a8004t-xr firmware >= 11.97.2 <= 14.19.4 –
iptime a804ns-mu firmware >= 10.06.4 <= 12.10.2 –
iptime a8ns-m firmware >= 10.03.2 <= 14.19.4 –
iptime a9004m firmware >= 10.05.4 <= 14.19.4 –
iptime a9004m-x2 firmware >= 11.98.2 <= 14.19.4 –
iptime ax11000 firmware >= 14.16.6 <= 14.19.4 –
iptime ax2002mesh firmware >= 14.16.6 <= 14.19.4 –
iptime ax2004 firmware >= 14.17.4 <= 14.19.4 –
iptime ax2004bcm firmware >= 12.04.2 <= 14.19.4 –
iptime ax2004m firmware >= 14.02.0 <= 14.19.4 –
iptime ax3004bcm firmware >= 14.16.2 <= 14.19.4 –
iptime ax3004itl firmware >= 12.01.2 <= 14.19.4 –
iptime ax8004bcm firmware >= 11.97.2 <= 14.19.4 –
iptime ax8004m firmware >= 14.05.2 <= 14.19.4 –
iptime ax8008m firmware >= 14.15.4 <= 14.19.4 –
iptime ew302n firmware >= 9.90.8 <= 12.16.2 –
iptime n102e firmware >= 11.00.8 <= 12.15.2 –
iptime n102eplus firmware >= 12.14.2 <= 12.15.2 –
iptime n102i firmware >= 11.01.2 <= 12.15.2 –
iptime n102iplus firmware >= 12.14.2 <= 12.15.2 –
iptime n104 black firmware >= 9.93.8 <= 10.06.8 –
iptime n104e firmware >= 10.09.4 <= 12.15.2 –
iptime n104eplus firmware >= 12.14.2 <= 12.15.2 –
iptime n104k firmware >= 9.90.8 <= 10.06.8 –
iptime n104plus firmware >= 9.90.8 <= 10.06.8 –
iptime n104plus-i firmware >= 9.99.6 <= 10.06.8 –
iptime n104q firmware >= 9.90.8 <= 10.06.8 –
iptime n104q-i firmware >= 9.99.6 <= 10.06.8 –
iptime n104r firmware >= 9.90.8 <= 10.06.8 –
iptime n104s-r1 firmware >= 9.90.8 <= 10.02.2 –
iptime n104v firmware >= 9.90.8 <= 10.06.8 –
iptime n1e firmware >= 9.90.8 <= 10.06.8 –
iptime n1plus firmware >= 9.90.8 <= 10.06.8 –
iptime n1plus-i firmware >= 9.99.6 <= 10.06.8 –
iptime n1v firmware >= 11.01.2 <= 12.07.6 –
iptime n2e firmware >= 9.90.8 <= 10.06.8 –
iptime n2eplus firmware >= 9.90.8 <= 10.06.8 –
iptime n2plus firmware >= 9.90.8 <= 10.06.8 –
iptime n2plus-i firmware >= 9.99.6 <= 10.06.8 –
iptime n2v firmware >= 10.09.2 <= 12.16.8 –
iptime n2vs firmware 12.16.8 –
iptime n3 firmware >= 9.93.2 <= 10.06.8 –
iptime n3-i firmware >= 9.99.6 <= 10.06.8 –

Mostrate 100 configurazioni su 164. L'elenco completo è su NVD.

Tipo di vulnerabilità

CWE-94 Code injection: controllo improprio della generazione di codice

Il prodotto costruisce in tutto o in parte un frammento di codice con dati provenienti dall’esterno, senza neutralizzare gli elementi speciali che possono cambiarne la sintassi o il comportamento.

Impatto sui sistemi

AmbitoImpatto
Controllo degli accessi Aggirare i meccanismi di protezione
In alcuni casi il codice iniettabile controlla l’autenticazione, il che può tradursi in una vulnerabilità sfruttabile da remoto.
Controllo degli accessi Ottenere privilegi o assumere un’altra identità
Il codice iniettato può accedere a risorse a cui l’attaccante non potrebbe accedere direttamente.
Integrità, Riservatezza, Disponibilità Eseguire codice o comandi non autorizzati
Quando un prodotto permette che l’input dell’utente contenga sintassi di codice, un attaccante può costruirlo in modo da alterare il flusso di esecuzione previsto. Per questo una code injection porta spesso all’esecuzione di codice arbitrario, e quasi sempre anche alla perdita di integrità dei dati.
Non ripudio Nascondere le proprie attività
Spesso le azioni compiute dal codice iniettato non lasciano traccia nei log.

Come si previene

Architettura e progettazione · Refactoring Riorganizza il programma in modo da non dover generare codice dinamicamente.
Architettura e progettazione 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 quale codice il prodotto è in grado di eseguire (per esempio con chroot su Unix o AppArmor). Il codice gestito può offrire una certa protezione. 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.
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 ridurre il rischio di code injection, usa elenchi rigorosi dei costrutti ammessi. Se costruisci dinamicamente codice che richiama una funzione, verificare che l’input sia alfanumerico può non bastare: un attaccante potrebbe comunque richiamare una funzione pericolosa non prevista, come system(), exec() o exit().
Test Usa strumenti e tecniche dinamiche che sollecitano il prodotto con ampie batterie di input diversi, come il fuzz testing (fuzzing), i test di robustezza e la fault injection. Il prodotto può rallentare, ma non deve diventare instabile, bloccarsi o produrre risultati errati.
Esercizio · Hardening della compilazione Esegui il codice in un ambiente che propaga automaticamente il «taint» degli input e impedisce l’esecuzione di comandi con variabili contaminate, come l’opzione -T di Perl. Il programma sarà costretto a validare gli input per rimuovere il taint; attenzione però a validarli correttamente, per non marcare come sicuri input pericolosi (vedi CWE-183 e CWE-184).
Esercizio · Hardening dell’ambiente Esegui il codice in un ambiente che propaga automaticamente il «taint» degli input e impedisce l’esecuzione di comandi con variabili contaminate, come l’opzione -T di Perl. Il programma sarà costretto a validare gli input per rimuovere il taint; attenzione però a validarli correttamente, per non marcare come sicuri input pericolosi (vedi CWE-183 e CWE-184).
Sviluppo Nei programmi Python si consiglia spesso di usare ast.literal_eval() al posto di eval, perché è pensata per non eseguire codice. Un attaccante può però comunque esaurire memoria o stack con strutture molto annidate, per questo la documentazione di Python ne sconsiglia l’uso su dati non attendibili.

Tutte le 5.902 CVE di tipo CWE-94, con andamento e prevenzione

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