shawl add --name test -- "C:\Program Files\Test App\testapp.exe"
Expected service command line:
"C:\Path with Spaces\shawl.exe" run --name test -- "C:\Program Files\Test App\testapp.exe"
Actual service command line:
C:\Path with Spaces\shawl.exe run --name test -- "C:\Program Files\Test App\testapp.exe"
If this service startup command line works (presuming testapp.exe exists in that path), then the Windows command-line parsing magic is working, but for sure security scanners will flag this as an "unquoted service path" vulnerability; e.g.: https://www.tenable.com/plugins/nessus/63155
The recommendation is to quote the executable path, thus preventing any potential exploit.
Reproduce:
shawl.exe
to this subdirectoryFrom this subdirectory, run command:
shawl add --name test -- "C:\Program Files\Test App\testapp.exe"
Expected service command line:
Actual service command line:
If this service startup command line works (presuming testapp.exe exists in that path), then the Windows command-line parsing magic is working, but for sure security scanners will flag this as an "unquoted service path" vulnerability; e.g.: https://www.tenable.com/plugins/nessus/63155
The recommendation is to quote the executable path, thus preventing any potential exploit.