diff --git a/src/app/application.cpp b/src/app/application.cpp index a124f2a3d..19b8823d2 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -335,7 +335,11 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c ::LocalFree(args); #else - QProcess::startDetached(QLatin1String("/bin/sh"), {QLatin1String("-c"), program}); + // Cannot give users shell environment by default, as doing so could + // enable command injection via torrent name and other arguments + // (especially when some automated download mechanism has been setup). + // See: https://github.com/qbittorrent/qBittorrent/issues/10925 + QProcess::startDetached(program); #endif }