NuProcess vulnerable to command-line injection through insertion of NUL character(s)
High severity
GitHub Reviewed
Published
Sep 25, 2022
in
brettwooldridge/NuProcess
•
Updated Jan 29, 2023
Description
Published by the National Vulnerability Database
Sep 26, 2022
Published to the GitHub Advisory Database
Sep 30, 2022
Reviewed
Sep 30, 2022
Last updated
Jan 29, 2023
Impact
In all the versions of NuProcess where it forks processes by using the JVM's Java_java_lang_UNIXProcess_forkAndExec method (1.2.0+), attackers can use NUL characters in their strings to perform command line injection. Java's ProcessBuilder isn't vulnerable because of a check in ProcessBuilder.start. NuProcess is missing that check.
This vulnerability can only be exploited to inject command line arguments on Linux.
Patches
2.0.5
Workarounds
Users of the library can sanitize command strings to remove NUL characters prior to passing them to NuProcess for execution.
References
None.
References