XMLInputFactory Default Settings Enable External Entities
Java XMLInputFactory instances created using XMLInputFactory.newInstance() default to allowing external entity processing (IS_SUPPORTING_EXTERNAL_ENTITIES = true) and DTD support (SUPPORT_DTD = true). These insecure defaults enable XXE attacks where malicious XML documents can define external entities referencing local files (file:///etc/passwd), internal network resources (http://internal-server/), or remote attacker-controlled servers. Developers unaware of these defaults create vulnerable XML parsers that process untrusted input without security hardening.