Questo sito utilizza cookie tecnici per funzionare correttamente.
🗓️ 02 Mar 2026  
Node.js child_process.exec() is a function that allows developers to execute system shell commands from within a Node.js application. It spawns a shell, runs the specified command, and buffers the output for use in the application. While convenient for automating tasks or integrating with other system tools, it poses significant security risks if user input is passed directly to the command string. This can lead to command injection vulnerabilities, where attackers execute arbitrary commands on the server. To mitigate these risks, developers should validate and sanitize all inputs and consider safer alternatives like child_process.spawn() for handling arguments.