-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a vulnerability from a crafted argument to 'bunyan -p ARG'
This was reported privately as: https://hackerone.com/reports/902739 bunyan - RCE via insecure command formatting After this change: % ./bin/bunyan -p "S'11;touch hacked ;'\\" bunyan: error: no matching PIDs found for "S'11;touch hacked ;'\" With _DEBUG self-logging to show the escaped command: % ./bin/bunyan -p "S'11;touch hacked ;'\\" (bunyan: exec cmd: "ps -A -o pid,command | grep '[S]'\\''11;touch hacked ;'\\''\\\\'") bunyan: error: no matching PIDs found for "S'11;touch hacked ;'\" (bunyan: cleanupAndExit) (bunyan: process.exit(2)) Before this change these would create a "hacked" file in the current dir.
- Loading branch information
Showing
4 changed files
with
37 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters