CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-55848

CVE-2026-55848: GML Layer XML External Entity (XXE) Injection in MapFish Print

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 29, 2026·7 min read·44 visits

Executive Summary (TL;DR)

Unauthenticated attackers can exploit the MapFish Print endpoint to read local server files and execute SSRF attacks by pointing the GML layer to a crafted remote XML document.

An XML External Entity (XXE) vulnerability in MapFish Print allows unauthenticated remote attackers to perform arbitrary local file disclosure and Server-Side Request Forgery (SSRF) by exploiting GML layer URL parameters in requests submitted to the /api/print3/print endpoint.

Vulnerability Overview

MapFish Print is an enterprise-grade, Java-based web component designed for generating and printing high-quality cartographic maps using predefined layout templates. It acts as an integration gateway, pulling geographic metadata, map coordinates, style configurations, and vector layers from diverse sources before compiling them into a final output format such as PDF or PNG. Within this architecture, MapFish Print exposes an unauthenticated web handler at the /api/print3/print endpoint.

To facilitate the printing of rich vector graphics, the application supports multiple layer types. One such supported layer format is the Geography Markup Language (GML), which is an XML-based specification defined by the Open Geospatial Consortium (OGC) to express geographical features. When handling a print job containing a GML layer, the MapFish Print engine resolves a user-supplied URL to retrieve the GML data stream.

Prior to the released security updates, the incoming GML stream was parsed directly by the integrated GeoTools GIS parsing framework without sufficient restrictions. Specifically, the XML parser engine was configured with default settings that allowed XML External Entity (XXE) resolution and did not prevent the parsing of inline Document Type Definitions (DTDs). The exposure of this endpoint and the associated parsing pipeline creates an unauthenticated, remote attack surface.

Root Cause Analysis

The root cause of this vulnerability lies in the implementation of the GML layer parsing engine found in core/src/main/java/org/mapfish/print/map/geotools/GmlLayer.java. During a print request, the MapFish server downloads the remote XML document representing the geographical layer from the user-specified GML URL. The application reads the remote document content into memory using its internal HTTP request factory.

Once retrieved, the document string is processed directly through a GeoTools parser instance. In Java environments, XML parsers such as the GeoTools XML parsing wrapper are vulnerable to XML External Entity Injection (CWE-611) if they do not explicitly disable external entity resolution. By default, standard parsers process external entity declarations (<!ENTITY ... SYSTEM ...>) and inline DTDs, resolving the specified files or URLs and substituting their contents into the parsed document.

Furthermore, the application's historical error handling routines exacerbated the severity of this vulnerability. When a parsing exception was encountered during GML compilation, the application constructed an error response that concatenated the raw gmlData string and returned it to the client. This response reflection path allows an attacker to extract the parsed document contents—including any successfully expanded external files—directly within the HTTP response body.

Code Analysis

To understand the vulnerability and its remediation, we examine the Java code modifications implemented in GmlLayer.java. In vulnerable versions of the application, the GML data retrieved from the network was passed directly to the GeoTools Parser class without any pre-validation or parser hardening configurations.

The patched code introduces a two-tiered defense. First, a strict pre-validation mechanism is executed before passing the payload to the GeoTools compiler. This is achieved by creating a secure DocumentBuilderFactory that disallows doctype declarations entirely.

// Hardened pre-validation gateway introduced in the patch
private void validateXmlInput(final String gmlData) {
  try {
    final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
    // Explicitly disallow DOCTYPE declarations to block XXE payloads
    factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
    factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
    factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
    factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
    factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
    factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
    factory.setXIncludeAware(false);
    factory.setExpandEntityReferences(false);
 
    factory
        .newDocumentBuilder()
        .parse(new ByteArrayInputStream(gmlData.getBytes(StandardCharsets.UTF_8)));
  } catch (ParserConfigurationException | SAXException | IOException e) {
    throw new PrintException("Failed to parse GML data", e);
  }
}

Second, the patch secures the GeoTools parser creation process (createParser) by overriding the runtime EntityResolver2 behavior. This acts as a secondary defense layer in case the primary validation is bypassed or disabled under unique runtime paths.

// Hardened parser creation with overridden EntityResolver
private Parser createParser(final Configuration configuration) {
  final Parser parser = new Parser(configuration);
  parser.getURIHandlers().addFirst(this.cachingUrihandler);
  parser.setEntityResolver(
      new EntityResolver2() {
        @Override
        public InputSource getExternalSubset(final String name, final String baseURI) {
          return new InputSource(new StringReader(""));
        }
 
        @Override
        public InputSource resolveEntity(
            final String name, 
            final String publicId, 
            final String baseURI, 
            final String systemId) {
          return new InputSource(new StringReader(""));
        }
 
        @Override
        public InputSource resolveEntity(final String publicId, final String systemId) {
          return new InputSource(new StringReader(""));
        }
      });
  return parser;
}

Additionally, the exception handling has been sanitized. Previously, error blocks threw exceptions that reflected the input gmlData. The updated code replaces these with standardized generic messages: throw new PrintException("Failed to parse GML data", e);.

Exploitation Mechanics

An attacker can exploit this vulnerability through a multi-step request workflow. The attack requires that the MapFish Print server has network line-of-sight to an attacker-controlled HTTP server to retrieve the external XML payload, or that the attacker can supply the payload via alternative protocol schemes.

To conduct the attack, the attacker first deploys a malicious GML file on a web server they control. The XML payload is structured with a custom DTD containing an external entity mapping to a local system file, such as /etc/passwd.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wfs:FeatureCollection [
  <!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<wfs:FeatureCollection
    xmlns:wfs="http://www.opengis.net/wfs"
    xmlns:gml="http://www.opengis.net/gml"
    xmlns:topp="http://www.openplans.org/topp">
  <gml:featureMember>
    <topp:streams fid="streams.1">
      <topp:the_geom>
        <gml:LineString srsName="EPSG:4326">
          <gml:coordinates>0,0 1,1</gml:coordinates>
        </gml:LineString>
      </topp:the_geom>
      <topp:name>&xxe;</topp:name>
    </topp:streams>
  </gml:featureMember>
</wfs:FeatureCollection>

The attacker then sends an HTTP POST request to the /api/print3/print endpoint on the target MapFish server. The request payload defines a GML layer where the URL points to the hosted malicious file. When the MapFish Print server parses the retrieved GML, it expands the &xxe; entity and references the contents of /etc/passwd. Because of the verbose error handling, the file contents are disclosed to the attacker in the subsequent error response.

Impact Assessment

The impact of CVE-2026-55848 is significant because it can lead to full compromise of confidentiality. MapFish Print instances are typically deployed inside corporate networks or containerized application environments such as Kubernetes to generate internal reports and mapping structures. Consequently, the local files accessible to the application often contain high-value data.

By leveraging the file protocol handler (file:///), an unauthenticated attacker can retrieve sensitive application configuration files, database credentials, internal SSL/TLS certificates, or local operating system user structures. In containerized environments, attackers can extract Kubernetes service-account tokens (/var/run/secrets/kubernetes.io/serviceaccount/token), which may allow them to authenticate directly to the Kubernetes API server and compromise the cluster.

Furthermore, because the application attempts to resolve any URI supplied in the system entity, this vulnerability can also be used to perform Server-Side Request Forgery (SSRF). Attackers can force the MapFish server to make HTTP requests to internal endpoints, enabling network scanning of internal subnets, interaction with local administrative interfaces, or retrieval of cloud instance metadata from providers (such as the AWS IMDS endpoint at http://169.254.169.254).

Remediation and Defense in Depth

The primary remediation path is to update MapFish Print to the patched versions. The vulnerabilities have been fully addressed in releases 3.28.30, 3.30.32, 3.31.24, 3.33.16, and 4.0.5. These versions include the hardened parser checks and disabled external entity resolvers.

For deployments where immediate updates are not feasible, several defensive controls can mitigate the risk. Network perimeter rules and firewall configurations should restrict the outbound network access of the MapFish Print application server. If MapFish Print does not require external network connections to retrieve remote map resources, blocking all outbound HTTP/HTTPS connections from the application host will neutralize both remote payload retrieval and SSRF exploit paths.

Additionally, administrators can implement a Web Application Firewall (WAF) rule to inspect POST requests to the /api/print3/print endpoint. The rule should identify and block incoming JSON requests that contain the gml layer type coupled with an external URL structure, or payloads that contain references to unapproved external domains.

Official Patches

MapFishSecurity Advisory and Patch Details

Fix Analysis (6)

Technical Appendix

CVSS Score
8.6/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Affected Systems

MapFish Print Core Application Suiteorg.mapfish.print:print-lib Maven packageorg.mapfish.print:print-servlet Maven package

Affected Versions Detail

Product
Affected Versions
Fixed Version
mapfish-print
MapFish
>= 3.0.0, < 3.28.303.28.30
mapfish-print
MapFish
>= 3.29.0, < 3.30.323.30.32
mapfish-print
MapFish
>= 3.31.0, < 3.31.243.31.24
mapfish-print
MapFish
>= 3.32.0, < 3.33.163.33.16
mapfish-print
MapFish
>= 4.0.0, < 4.0.54.0.5
AttributeDetail
CWE IDCWE-611
Attack VectorNetwork
CVSS v3.18.6
ImpactArbitrary File Disclosure, SSRF
Exploit Statuspoc
CISA KEV StatusFalse

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1005Data from Local System
Collection
CWE-611
Improper Restriction of XML External Entity Reference

The software associates an XML document with an external entity declaration that contains a URI, which references resources on the local host or network, allowing disclosure of local file contents or server-side request execution.

Known Exploits & Detection

GitHub Security AdvisoryDetails of the vulnerability and security implications on GML file reading capabilities.

Vulnerability Timeline

Vulnerability remediated in code repository via security patches
2026-06-04
Security Advisory GHSA-5v29-34h8-v68r published
2026-08-28
CVE-2026-55848 assigned and published in the NVD
2026-08-28

References & Sources

  • [1]GitHub Security Advisory GHSA-5v29-34h8-v68r
  • [2]CVE-2026-55848 on CVE.org

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 minutes ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
1 views•6 min read
•5 minutes ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
1 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read
•10 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
18 views•5 min read
•10 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
24 views•6 min read