nyx/tests/fixtures/ssti/ruby/unsafe_erb_new.rb
2026-05-07 01:29:31 -04:00

10 lines
239 B
Ruby

# Unsafe: ERB.new receives a tainted template *source* string from
# request params; SSTI fires on the source argument.
require "erb"
def handler(params)
src = params[:template]
template = ERB.new(src)
template.result(binding)
end