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

CVE-2024-45801

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

Descrizione

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It has been discovered that malicious HTML using special nesting techniques can bypass the depth checking added to DOMPurify in recent releases. It was also possible to use Prototype Pollution to weaken the depth check. This renders dompurify unable to avoid cross site scripting (XSS) attacks. This issue has been addressed in versions 2.5.4 and 3.1.3 of DOMPurify. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
cure53 dompurify < 2.5.4 –
cure53 dompurify >= 3.0.0 < 3.1.3 –
Tutte le 36 vulnerabilità di Cure53 Dompurify

Tipo di vulnerabilità

CWE-1321 Prototype pollution: modifica non controllata del prototipo di un oggetto

Il prodotto riceve dall’esterno gli attributi da impostare in un oggetto, ma non impedisce che vengano modificati anche quelli del suo prototipo, alterando il comportamento di tutta l’applicazione (tipico di JavaScript).

Impatto sui sistemi

AmbitoImpatto
Riservatezza, Integrità, Disponibilità Leggere i dati dell’applicazione, Modificare i dati dell’applicazione
Disponibilità Interruzione del servizio: arresto o riavvio

Come si previene

Sviluppo By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
Architettura e progettazione By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
Sviluppo · Validazione dell’input When handling untrusted objects, validating using a schema can be used.
Sviluppo By using an object without prototypes (via Object.create(null) ), adding object prototype attributes by accessing the prototype via the special attributes becomes impossible, mitigating this weakness.
Sviluppo Map can be used instead of objects in most cases. If Map methods are used instead of object attributes, it is not possible to access the object prototype or modify it.

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

Tutte le 588 CVE di tipo CWE-1321, con andamento e prevenzione

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