1. Archivio CVE
  2. 2019
  3. CVE-2019-10160

CVE-2019-10160

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 security regression of CVE-2019-9636 was discovered in python since commit d537ab0ff9767ef024f26246899728f0116b1ec3 affecting versions 2.7, 3.5, 3.6, 3.7 and from v3.8.0a4 through v3.8.0b1, which still allows an attacker to exploit CVE-2019-9636 by abusing the user and password parts of a URL. When an application parses user-supplied URLs to store cookies, authentication credentials, or other kind of information, it is possible for an attacker to provide specially crafted URLs to make the application locate host-related information (e.g. cookies, authentication data) and send them to a different host than where it should, unlike if the URLs had been correctly parsed. The result of an attack may vary based on the application.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
canonical ubuntu linux 12.04 –
canonical ubuntu linux 14.04 –
canonical ubuntu linux 16.04 –
canonical ubuntu linux 18.04 –
canonical ubuntu linux 19.04 –
debian debian linux 8.0 –
debian debian linux 9.0 –
fedoraproject fedora 29 –
fedoraproject fedora 30 –
fedoraproject fedora 31 –
netapp cloud backup tutte –
netapp converged systems advisor agent tutte –
opensuse leap 15.0 –
opensuse leap 15.1 –
python python >= 2.7.0 < 2.7.17 –
python python >= 3.5.0 < 3.5.8 –
python python >= 3.6.0 < 3.6.9 –
python python >= 3.7.0 < 3.7.4 –
python python 3.8.0 alpha4 –
python python 3.8.0 beta1 –
redhat enterprise linux desktop 7.0 –
redhat enterprise linux eus 7.6 –
redhat enterprise linux server 7.0 –
redhat enterprise linux server aus 7.6 –
redhat enterprise linux server tus 7.6 –
redhat enterprise linux workstation 7.0 –
redhat virtualization 4.0 –
Tutte le 143 vulnerabilità di Python

Tipo di vulnerabilità

CWE-172 Improper Encoding or Decoding of Data

The product does not properly encode or decode data, resulting in unexpected values that are not equivalent to the original data.

Impatto sui sistemi

AmbitoImpatto
Integrità Stato imprevisto

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.
Sviluppo · Codifica dell’output Usare stringhe di query, codice o comandi generati dinamicamente che mescolano controllo e dati è rischioso, ma a volte è inevitabile. In quel caso racchiudi correttamente gli argomenti tra virgolette e applica l’escaping a ogni carattere speciale. L’approccio più prudente è applicare l’escaping o filtrare tutti i caratteri che non rientrano in un elenco molto ristretto (per esempio tutto ciò che non è alfanumerico o spazio); se servono caratteri speciali, racchiudi ogni argomento tra virgolette dopo il filtraggio. Attenzione all’argument injection (CWE-88).
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.

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

Tutte le 23 CVE di tipo CWE-172, con andamento e prevenzione

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