Media

Denial of service caused by infinite recursion when parsing SVG images

  • Publicada: 13.12.2023
  • Actualizado: 11.10.2026 10:22

Summary

When parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are allowed. One of the validations is that the SVG document does not reference itself. However, a recursive chained using two or more SVG documents is not correctly validated. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.

Details

php-svg-lib, when run in isolation, does not support SVG references for image elements. An SVG document can, however, be referenced and Dompdf will run that reference through the same validation. Dompdf currently includes validation to prevent self-referential image references, but a chained reference is not checked. A malicious actor may thus trigger infinite recursion in the validation process by chaining references between two or more SVG images.

PoC

This following sources can be used to bypass validation provided by Dompdf:

recurse.html

<img src="one.svg">

one.svg

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
  <image href="two.svg" />
</svg>

two.svg

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
  <image href="one.svg" />
</svg>

Impact

When Dompdf parses the above payload, it will crash due after exceeding the allowed execution time or memory usage. An attacker sending multiple request to a system can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer dompdf/dompdf < 2.0.4 2.0.4

Referencias

Puntuación CVSS 5.3/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Debilidad (CWE)
CWE-20
Plataforma
Composer
Paquete
dompdf/dompdf
Publicada
13.12.2023
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-3qx2-6f78-w2j2 - CC BY 4.0

Historial de vulnerabilidades: dompdf/dompdf

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (20) en el archivo
Entradas en total
20
Primera → última
04.2022 07.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 5
  • Alta 3
  • Media 10
  • Baja 2

Divulgaciones por año

  1. 2022: 9
  2. 2023: 3
  3. 2024: 2
  4. 2025: 0
  5. 2026: 6
Gravedad:
  1. Crítica · 9.8 CVE-2021-3838 < 2.0.0 2.0.0
  2. Denial of service caused by infinite recursion when parsing SVG images esta entrada
    Media · 5.3 CVE-2023-50262 < 2.0.4 2.0.4
  3. Crítica · 10.0 CVE-2023-24813 >= 2.0.2, < 2.0.3 2.0.3
  4. Crítica · 10.0 CVE-2023-23924 < 2.0.2 2.0.2
  5. Alta · 8.8 CVE-2014-5013 >= 0.6, < 0.6.2 0.6.2
  6. Alta CVE-2010-4879 >= 0.6, < 0.6.1 0.6.1
  7. Crítica · 9.8 CVE-2022-28368 < 1.2.1 1.2.1

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.