security
vulnerability_error
ai_generated
true
XXE: external entity reference in XML parser
ID: security/xxe-injection
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
XML parser processes external entity references.
genericWorkarounds
-
95% success Disable external entity processing in XML parser
factory.setFeature("http://xml.org/sax/features/external-general-entities",false) -
88% success Use JSON instead of XML where possible
Dead Ends
Common approaches that don't work:
-
Filter DOCTYPE declarations with regex
80% fail
Easily bypassed with encoding
-
Validate XML against schema only
78% fail
Schema validation doesnt prevent XXE