XML External Entity vulnerability detected.
- Rule ID: javascript_express_xml_external_entity_vulnerability
- Languages: javascript
- 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 noent
to true
.
var libxml = require("libxmljs");
libxml.parseXmlString(xml, { noent: true, noblanks: true });
Resources
Associated CWE
OWASP Top 10
Ready to take the next step? Join the Bearer Cloud waitlist.