XXE Vulnerability in MapFish Print
MapFish Print is susceptible to an XML External Entity (XXE) injection vulnerability via the GML layer processing feature, allowing attackers to perform arbitrary file reads or Server-Side Request Forgery (SSRF).
CVE search metadata
CVE search record: CVE-2026-55848. Severity: high. CVSS: 8.6. KEV: no. Product: print-lib (3.0.0-3.28.29, 3.29.0-3.30.31, 3.32.0-3.33.15, 3.34.0-4.0.4), print-servlet (3.0.0-3.28.29, 3.29.0-3.30.31, 3.31.0-3.31.23, 3.32.0-3.33.15, 3.34.0-4.0.4). Brief: XXE Vulnerability in MapFish Print. Brief link: https://feed.craftedsignal.io/briefs/2026-08-mapfish-xxe/
MapFish Print, a Java-based web application for generating printable reports, contains an XML External Entity (XXE) vulnerability identified as CVE-2026-55848. The issue originates from the way the print service processes GML layers. By submitting a JSON payload to the /api/print3/print/mapviewer/buildreport.pdf endpoint with a manipulated GML layer URL, an attacker can point the application to a remote, malicious DTD file.
When processed, this configuration triggers the XXE, which can be leveraged to exfiltrate local files from the server, perform directory listing, or initiate SSRF attacks against internal network resources. The vulnerability affects multiple versions of the print-lib and print-servlet components within the 3.x and 4.x branches. This impact is significant for organizations deploying MapFish Print in cloud environments, as it may lead to the exposure of Kubernetes service account tokens or other sensitive system credentials.
Attack Chain
- The attacker stands up a remote server hosting a malicious PHP script (xxe.php) and an associated DTD file (evil.dtd).
- The attacker constructs a JSON request for the MapFish Print
buildreport.pdfendpoint. - The JSON request includes a
layersobject with thetypeset togmland aurlpointing to the attacker-controlledxxe.phpscript with a file path parameter (e.g.,/etc/passwd). - The MapFish Print server initiates an HTTP request to the attacker-controlled
xxe.phpserver to retrieve the XML configuration. - The attacker's server responds with an XML document containing the malicious DTD and the defined entity, which triggers the file read on the MapFish server.
- The MapFish server attempts to load the file referenced by the entity, and the error processing mechanism (specifically 404 handler) returns the content of the target file in the response body.
- The attacker receives the sensitive file contents directly in the HTTP response from the MapFish Print service.
Impact
Successful exploitation allows for the unauthorized disclosure of local server files, including sensitive configuration files and credentials. Furthermore, the vulnerability supports SSRF, enabling attackers to interact with internal infrastructure, potentially bypassing network segmentation or accessing metadata services in cloud environments.
Recommendation
- Upgrade MapFish Print to the latest version (v4.0.5 or higher) to remediate CVE-2026-55848.
- Implement an egress filtering policy on all MapFish Print servers to restrict outbound HTTP/HTTPS connections, preventing the application from fetching untrusted remote DTDs.
- Deploy WAF rules to inspect JSON payloads sent to the print API for anomalous GML layer URLs, specifically looking for external domains or unusual URI parameters.
- Review server logs for anomalous outbound HTTP requests originating from the MapFish Print application process.
Immediate actions
Upgrade MapFish Print to version 4.0.5 or later.
Mitigations
Restrict outbound internet access for MapFish Print service servers.
CVE-2026-55848