1. Archivio CVE
  2. 2024
  3. CVE-2024-4030

CVE-2024-4030

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

Descrizione

On Windows a directory returned by tempfile.mkdtemp() would not always have permissions set to restrict reading and writing to the temporary directory by other users, instead usually inheriting the correct permissions from the default location. Alternate configurations or users without a profile directory may not have the intended permissions. If you’re not using Windows or haven’t changed the temporary directory location then you aren’t affected by this vulnerability. On other platforms the returned directory is consistently readable and writable only by the current user. This issue was caused by Python not supporting Unix permissions on Windows. The fix adds support for Unix “700” for the mkdir function on Windows which is used by mkdtemp() to ensure the newly created directory has the proper permissions.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
python software foundation cpython < 3.8.20 –
python software foundation cpython >= 3.9.0 < 3.9.20 –
python software foundation cpython >= 3.10.0 < 3.10.15 –
python software foundation cpython >= 3.11.0 < 3.11.10 –
python software foundation cpython >= 3.12.0 < 3.12.4 –
python software foundation cpython >= 3.13.0a1 < 3.13.0b1 –
Tutte le 64 vulnerabilità di Python Software Foundation Cpython

Tipo di vulnerabilità

CWE-276 Permessi predefiniti errati

Durante l’installazione i file vengono creati con permessi che consentono a chiunque di modificarli.

Impatto sui sistemi

AmbitoImpatto
Riservatezza, Integrità Leggere i dati dell’applicazione, Modificare i dati dell’applicazione

Come si previene

Architettura e progettazione · Esercizio The architecture needs to access and modification attributes for files to only those users who actually require those actions.
Architettura e progettazione · Separazione dei privilegi Suddividi il sistema in compartimenti, con aree sicure i cui confini di fiducia siano tracciati senza ambiguità. Non lasciare uscire i dati sensibili da questi confini e presta sempre attenzione quando interagisci con un compartimento esterno all’area sicura. La suddivisione va prevista già in fase di progettazione e deve favorire la separazione dei privilegi; per decidere quando usare i privilegi e quando rinunciarvi, segui il principio del privilegio minimo.

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

Tutte le 1.555 CVE di tipo CWE-276, con andamento e prevenzione

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