Files
codeql/javascript/ql/test/query-tests/Security/CWE-611/libxml.sax.js
2020-07-08 10:03:03 +02:00

8 lines
274 B
JavaScript

const express = require('express');
const libxmljs = require('libxmljs');
express().get('/some/path', function(req) {
const parser = new libxmljs.SaxParser();
parser.parseString(req.param("some-xml")); // NOT OK: the SAX parser expands external entities by default
});