1. Archivio CVE
  2. 2022
  3. CVE-2022-1941

CVE-2022-1941

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

Descrizione

A parsing vulnerability for the MessageSet type in the ProtocolBuffers versions prior to and including 3.16.1, 3.17.3, 3.18.2, 3.19.4, 3.20.1 and 3.21.5 for protobuf-cpp, and versions prior to and including 3.16.1, 3.17.3, 3.18.2, 3.19.4, 3.20.1 and 4.21.5 for protobuf-python can lead to out of memory failures. A specially crafted message with multiple key-value per elements creates parsing issues, and can lead to a Denial of Service against services receiving unsanitized input. We recommend upgrading to versions 3.18.3, 3.19.5, 3.20.2, 3.21.6 for protobuf-cpp and 3.18.3, 3.19.5, 3.20.2, 4.21.6 for protobuf-python. Versions for 3.16 and 3.17 are no longer updated.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
debian debian linux 10.0 –
fedoraproject fedora 36 –
fedoraproject fedora 37 –
google protobuf-cpp < 3.18.3 –
google protobuf-cpp >= 3.19.0 < 3.19.5 –
google protobuf-cpp >= 3.20.0 < 3.20.2 –
google protobuf-cpp >= 3.21.0 < 3.21.6 –
google protobuf-python < 3.18.3 –
google protobuf-python >= 3.19.0 < 3.19.5 –
google protobuf-python >= 3.20.0 < 3.20.2 –
google protobuf-python >= 4.0.0 < 4.21.6 –

Tipo di vulnerabilità

CWE-1286 Improper Validation of Syntactic Correctness of Input

The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax.

Impatto sui sistemi

AmbitoImpatto
Altro Dipende dal contesto

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.

Tutte le 82 CVE di tipo CWE-1286, con andamento e prevenzione

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