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

CVE-2025-8291

4.3 Gravità media CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N 4.3 – Media

Descrizione

The 'zipfile' module would not check the validity of the ZIP64 End of Central Directory (EOCD) Locator record offset value would not be used to locate the ZIP64 EOCD record, instead the ZIP64 EOCD record would be assumed to be the previous record in the ZIP archive. This could be abused to create ZIP archives that are handled differently by the 'zipfile' module compared to other ZIP implementations. Remediation maintains this behavior, but checks that the offset specified in the ZIP64 EOCD Locator record matches the expected value.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
python software foundation cpython < 3.9.24 –
python software foundation cpython >= 3.10.0 < 3.10.19 –
python software foundation cpython >= 3.11.0 < 3.11.14 –
python software foundation cpython >= 3.12.0 < 3.12.12 –
python software foundation cpython >= 3.13.0 < 3.13.10 –
python software foundation cpython >= 3.14.0 < 3.14.1 –
Tutte le 64 vulnerabilità di Python Software Foundation Cpython

Tipo di vulnerabilità

CWE-1285 Improper Validation of Specified Index, Position, or Offset in Input

The product receives input that is expected to specify an index, position, or offset into an indexable resource such as a buffer or file, but it does not validate or incorrectly validates that the specified index/position/offset has the required properties.

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 34 CVE di tipo CWE-1285, con andamento e prevenzione

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