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

CVE-2019-9636

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

Python 2.7.x through 2.7.16 and 3.x through 3.7.2 is affected by: Improper Handling of Unicode Encoding (with an incorrect netloc) during NFKC normalization. The impact is: Information disclosure (credentials, cookies, etc. that are cached against a given hostname). The components are: urllib.parse.urlsplit, urllib.parse.urlparse. The attack vector is: A specially crafted URL could be incorrectly parsed to locate cookies or authentication data and send that information to a different host than when parsed correctly. This is fixed in: v2.7.17, v2.7.17rc1, v2.7.18, v2.7.18rc1; v3.5.10, v3.5.10rc1, v3.5.7, v3.5.8, v3.5.8rc1, v3.5.8rc2, v3.5.9; v3.6.10, v3.6.10rc1, v3.6.11, v3.6.11rc1, v3.6.12, v3.6.9, v3.6.9rc1; v3.7.3, v3.7.3rc1, v3.7.4, v3.7.4rc1, v3.7.4rc2, v3.7.5, v3.7.5rc1, v3.7.6, v3.7.6rc1, v3.7.7, v3.7.7rc1, v3.7.8, v3.7.8rc1, v3.7.9.

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 28 –
fedoraproject fedora 29 –
fedoraproject fedora 30 –
fedoraproject fedora 31 –
opensuse leap 15.0 –
opensuse leap 15.1 –
opensuse leap 42.3 –
oracle sun zfs storage appliance kit 8.8.6 –
python python >= 2.7.0 < 2.7.17 –
python python >= 3.0.0 < 3.4.10 –
python python >= 3.5.0 < 3.5.7 –
python python >= 3.6.0 < 3.6.9 –
python python >= 3.7.0 < 3.7.3 –
redhat enterprise linux 7.5 –
redhat enterprise linux 8.0 –
redhat enterprise linux desktop 6.0 –
redhat enterprise linux eus 7.5 –
redhat enterprise linux eus 8.1 –
redhat enterprise linux eus 8.2 –
redhat enterprise linux eus 8.4 –
redhat enterprise linux eus 8.6 –
redhat enterprise linux server 6.0 –
redhat enterprise linux server aus 7.4 –
redhat enterprise linux server aus 8.2 –
redhat enterprise linux server aus 8.4 –
redhat enterprise linux server eus 5.6 –
redhat enterprise linux server tus 7.4 –
redhat enterprise linux server tus 8.2 –
redhat enterprise linux server tus 8.4 –
redhat enterprise linux server tus 8.6 –
redhat enterprise linux workstation 6.0 –
redhat openshift container platform 3.11 –
redhat virtualization 4.0 –
Tutte le 143 vulnerabilità di Python

Tipo di vulnerabilità

CWE-173 Improper Handling of Alternate Encoding

The product does not properly handle when an input uses an alternate encoding that is valid for the control sphere to which the input is being sent.

Impatto sui sistemi

AmbitoImpatto
Controllo degli accessi Aggirare i meccanismi di protezione

Come si previene

Architettura e progettazione · Validazione dell’input Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.
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 Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
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 7 CVE di tipo CWE-173, con andamento e prevenzione

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