XML External Entity vulnerability detected.
- Rule ID: php_lang_xml_external_entity_vulnerability
- Languages: php
- Source: xml_external_entity_vulnerability.yml
Description
Avoid parsing untrusted data as XML. Such data could include URIs that resolve to resources that are outside of the current context, leading to XML External Entity (XXE) injection.
Remediations
❌ Do not enable parsing of external entities.
For LibXML, for example, do not set the LIBXML_NOENT
flag.
Resources
Associated CWE
OWASP Top 10
Configuration
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=php_lang_xml_external_entity_vulnerability
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=php_lang_xml_external_entity_vulnerability
Ready to take the next step? Learn more about Bearer Cloud.