mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
14 lines
505 B
JavaScript
14 lines
505 B
JavaScript
// Cross-file factory caller: taints an environment variable,
|
|||
// stores it into a container produced by a cross-file factory helper,
|
|||
// and sinks a subsequent read of the container through `exec`.
|
|||
const factory = require('./factory.js');
|
|||
const child_process = require('child_process');
|
|||
|
|||
function run() {
|
|||
const bag = factory.makeBag();
|
|||
factory.fillBag(bag, process.env.INPUT);
|
|||
child_process.exec(bag[0]); // VULN: tainted env value flows through cross-file factory
|
|||
}
|
|||
|
|||
module.exports = { run };
|