High severityC#XML External Entities (XXE)HIGH confidence
Dtdprocessing Parse
An XML reader is configured with DtdProcessing.Parse (or ProhibitDtd = false), which enables DTD/entity processing and exposes XML External Entity (XXE) injection and entity-expansion DoS (CWE-611).
Standards mapping
- OWASP Top 10
- A05:2021 - Security Misconfiguration
- OWASP ASVS
- V5.5.2 (L1)
Vulnerable vs. safe
Flagged by this check
DtdProcessing = DtdProcessing.ParsePasses - the safe pattern
DtdProcessing = DtdProcessing.ProhibitWhy it matters & how to fix it
An XML reader is configured with DtdProcessing.Parse (or ProhibitDtd = false), which enables DTD/entity processing and exposes XML External Entity (XXE) injection and entity-expansion DoS (CWE-611). Set DtdProcessing = DtdProcessing.Prohibit (or Ignore) and leave XmlResolver null when parsing untrusted XML.
References
Rule ID integsec.csharp.xxe.dtdprocessing-parse - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- Python - XML External Entities (XXE)Lxml XXE Resolve Entities
- Python - XML External Entities (XXE)XML Etree Parse Untrusted
- Java - XML External Entities (XXE)XXE Documentbuilderfactory
- Java - XML External Entities (XXE)XXE Saxparserfactory
- Java - XML External Entities (XXE)XXE Transformerfactory
- Java - XML External Entities (XXE)XXE Xmlinputfactory