haskell / process

Library for dealing with system processes
http://hackage.haskell.org/package/process
Other
87 stars 82 forks source link

Address Windows command-line injection vulnerability #312

Closed bgamari closed 7 months ago

bgamari commented 7 months ago

The process library on Windows is vulnerable to a command injection vulnerability, via cmd.exe's interpretation of arguments. Processes that invoke batch files (.bat, .cmd) and pass arguments whose values are affected by program inputs may be affected.

Add some additional escaping to neutralise this scenario.

Also add some additional library documentation explaining how arguments are processed on Windows.

Co-authored-By: Fraser Tweedale HSEC-identifier: HSEC-2024-0003