# Unsafe-deserialization / XXE pre-scan

- target: `/workspace/deliverables/deser-prescan/sample-repo`
- source files scanned: 4
- findings: HIGH 8 · MEDIUM 5 · LOW 0 · INFO 0

_Deterministic pre-scan — not an audit. Line-based; no dataflow, no reachability proof, no runtime config. A clean report is not proof deserialization is safe._


## HIGH

- `Import.java:6` **JAVA-DESERIALIZE** — Java native deserialization — gadget-chain RCE class on untrusted input
- `Import.java:7` **JAVA-DESERIALIZE** — Java native deserialization — gadget-chain RCE class on untrusted input
- `State.cs:4` **DOTNET-DESERIALIZE** — dangerous .NET deserializer (BinaryFormatter family) — Microsoft: never use on untrusted input
- `handler.py:7` **PICKLE-LOAD** — pickle/dill deserialization — arbitrary code execution on untrusted input; use json or a typed format
- `handler.py:10` **YAML-UNSAFE-LOAD** — yaml.load without a safe loader — arbitrary object construction; use safe_load / Loader=SafeLoader
- `handler.py:16` **XXE-ENTITIES-ON** — external entity expansion explicitly enabled — direct XXE exposure if input is untrusted
- `view.php:2` **PHP-UNSERIALIZE** — PHP unserialize() — object-injection class on untrusted input
- `view.php:4` **XXE-ENTITIES-ON** — external entity expansion explicitly enabled — direct XXE exposure if input is untrusted

## MEDIUM

- `Import.java:10` **XXE-JAVA-PARSER** — JAXP/SAX/dom4j XML parser — XXE unless doctype/external-entity features disabled
- `handler.py:13` **JSONPICKLE-DECODE** — jsonpickle decodes arbitrary Python classes — treat input as code
- `handler.py:17` **XXE-PY-PARSER** — Python XML parser — stdlib parsers ignore external general entities but lxml resolves them by default; prefer defusedxml
- `view.php:3` **XXE-PHP** — PHP XML parser — pass LIBXML_NONET and avoid LIBXML_NOENT for untrusted input
- `view.php:4` **XXE-PHP** — PHP XML parser — pass LIBXML_NONET and avoid LIBXML_NOENT for untrusted input
