Views
No views yet
poc.pmml with pmml4s (or pypmml, which bundles it)
triggers XML External Entity processing (CWE-611): the parser fetches an external DTD and reads
a local file off the host. The model parses with no error, so the read is transparent.pip install pypmml (needs a JRE on PATH — pmml4s is a Scala/JVM library)python3 canary.py (starts a loopback observation listener on 127.0.0.1:8099)python3 -c "from pypmml import Model; Model.fromFile('poc.pmml')"HIT /leak?d=HOSTNAME/etc/hostname and exfiltrated it = arbitrary file read (XXE).
It also fetched evil.dtd from this repo = SSRF / external-entity resolution.poc.pmml — malicious PMML model; its DOCTYPE points at evil.dtd in this repoevil.dtd — parameter-entity chain: reads file:///etc/hostname, exfils to 127.0.0.1:8099 (loopback)canary.py — local listener so you can observe the read (loopback only)org/pmml4s/xml/pull.scala: val factory = XMLInputFactory.newFactory with no
SUPPORT_DTD=false / IS_SUPPORTING_EXTERNAL_ENTITIES=false. Fix: disable DTD support.