High severityPHPOther Security ChecksMEDIUM confidence
XXE Noent Parsing
XML is parsed with the LIBXML_NOENT flag, which substitutes external entities and enables XXE (CWE-611), allowing file disclosure and SSRF when the XML is attacker-controlled.
Standards mapping
- OWASP Top 10
- A05:2021 - Security Misconfiguration
- OWASP ASVS
- V5.5.2 (L1)
Vulnerable vs. safe
Flagged by this check
$doc->loadXML($xml, LIBXML_NOENT);Passes - the safe pattern
$doc->loadXML($xml);Why it matters & how to fix it
XML is parsed with the LIBXML_NOENT flag, which substitutes external entities and enables XXE (CWE-611), allowing file disclosure and SSRF when the XML is attacker-controlled. Remove LIBXML_NOENT (and LIBXML_DTDLOAD) when parsing untrusted input.
References
Rule ID integsec-php-xxe-noent-parsing - 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
- JavaScript / TypeScript - Other Security ChecksChild Process Shell True
- JavaScript / TypeScript - Other Security ChecksOpen Redirect Tainted Input
- Python - Other Security ChecksDjango Mark Safe
- Python - Other Security ChecksFlask Debug Enabled
- Python - Other Security ChecksFlask Render Template String
- Python - Other Security ChecksInsecure Tempfile Mktemp