/

CVE-2026-55848

Severity:

HIGH RISK

(8.6)

XML External Entity (CWE-611) in MapFish Print GML

CVE-2026-55848

Deferred

Vulnerability type

Category:

XML External Entity (XXE)

CWE:

CWE-611

Impact:

Sensitive File Disclosure and Server-Side Request Forgery

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MapFish Print contains an XML External Entity (XXE) vulnerability in its GML layer processing. An unauthenticated attacker may supply a remote GML document that causes the server to read local files or make requests to internal services when external entities and DTDs are processed.

Affected context

The vulnerability occurs in MapFish Print deployments that expose the /api/print3/print endpoint and allow requests to specify an attacker-controlled GML layer URL. The fetched XML is processed by the GML layer parser without sufficiently restricting external entities or external DTDs. Deployments are particularly exposed when the printing service can access sensitive local files, service-account credentials, certificates, or internal network endpoints.

Exploit preconditions

  • Attack surface: The publicly reachable /api/print3/print endpoint and its GML layer URL handling
  • Required access: No authentication may be required when the endpoint is exposed to an attacker
  • Trigger point: Retrieval and parsing of attacker-controlled XML and DTD content by the GML layer parser
  • Why exploitation is possible: External entities and DTDs are processed, allowing XML content to reference local files or initiate server-side network requests

Why this happens

The underlying bug is insecure XML parser configuration. The GML layer processing accepts external XML declarations without disabling external entity resolution and external DTD loading. This maps to CWE-611: Improper Restriction of XML External Entity Reference, where attacker-controlled XML can cause the application to resolve entities against local resources or network locations during parsing.

Potential impact

  • An attacker may read sensitive local files
  • Kubernetes service-account tokens or certificates could be exposed
  • The service may be abused to access internal HTTP endpoints
  • Internal network topology or service responses could be disclosed
  • Compromised credentials could enable further unauthorized access

General mitigation guidance

Mitigation generally focuses on making XML parsing safe by default and reducing trust in externally supplied layer URLs.

Common defensive patterns include:

  • Disable external entity resolution and external DTD loading in every XML parser used for untrusted content
  • Use hardened, namespace-aware XML processing configurations with entity expansion restricted
  • Validate GML structure against an allowlisted schema before application processing
  • Restrict layer URLs to approved schemes, hosts, and network destinations
  • Apply outbound network controls so printing services cannot reach sensitive internal endpoints
  • Run the service with least-privilege filesystem and network permissions
  • Keep secrets, tokens, and certificates outside locations readable by the application process where practical
  • Apply layered response and error handling so parser failures cannot disclose fetched content

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules for XML parser settings that leave external entities or DTDs enabled
  • Code review checks for XML parsing of user-controlled URLs or documents
  • Tests using benign external-entity and internal-request canaries in isolated environments
  • Monitoring for unexpected outbound requests from the printing service
  • Web application logs showing unusual GML layer URLs, external DTD references, or parser errors containing sensitive data
  • Network policy enforcement that blocks unnecessary egress from the application

Automated security review tools may help detect unsafe parser configuration, but runtime and network controls should provide defense in depth.

Sources

SourceLink
github.comgithub.com/mapfish/mapfish-print/commit/13beae7a7f970fc3526c1f7ca5db817d8d51fbec
github.comgithub.com/mapfish/mapfish-print/commit/23a96e7baa15077bdb0e5fc5a72b18da23af9121
github.comgithub.com/mapfish/mapfish-print/commit/3525e8150fcb5f40095930ccf7aec0d8ce92bbcb
github.comgithub.com/mapfish/mapfish-print/commit/56c47d3bf70d8428916dea8ed7005518ad07dc7d
github.comgithub.com/mapfish/mapfish-print/commit/a55a24873db5f19b37abac7d59144dc86406c236
github.comgithub.com/mapfish/mapfish-print/commit/d13911ac6e0509444d64e74830f10b14e4dcfdf1
github.comgithub.com/mapfish/mapfish-print/pull/4212
github.comgithub.com/mapfish/mapfish-print/pull/4215
github.comgithub.com/mapfish/mapfish-print/pull/4216
github.comgithub.com/mapfish/mapfish-print/pull/4217
github.comgithub.com/mapfish/mapfish-print/pull/4219
github.comgithub.com/mapfish/mapfish-print/pull/4221
github.comgithub.com/mapfish/mapfish-print/releases/tag/3.28.30
github.comgithub.com/mapfish/mapfish-print/releases/tag/3.30.32
github.comgithub.com/mapfish/mapfish-print/releases/tag/3.31.24
github.comgithub.com/mapfish/mapfish-print/releases/tag/4.0.5
github.comgithub.com/mapfish/mapfish-print/security/advisories/GHSA-5v29-34h8-v68r

Frequently asked

questions

Yes. If the print endpoint is reachable without authentication and accepts attacker-controlled GML layer URLs, an attacker may trigger the vulnerable XML processing remotely.

The attacker generally needs network access to the print endpoint. They do not necessarily need an account when the endpoint is unauthenticated, although deployment-specific access controls can limit exposure.

Configure XML parsers to reject external entities and external DTDs, validate GML against an allowlisted schema, and restrict outbound connections from the service.

Treat fetched XML and layer URLs as untrusted input, enforce strict URL and network policies, use least-privilege runtime permissions, and include XXE-focused tests and parser-configuration checks in code review and CI pipelines.

Find out what's already
exploitable in your codebase.