2026-05-26 12:59:02 -05:00
|
|
|
# Ruby ActionController action, vulnerable.
|
|
|
|
|
# The harness drives UsersController.action(:index) through Rack.
|
2026-05-14 17:45:42 -05:00
|
|
|
|
2026-05-26 12:59:02 -05:00
|
|
|
require 'action_controller'
|
|
|
|
|
|
|
|
|
|
class ApplicationController < ActionController::Base
|
|
|
|
|
self.view_paths = []
|
2026-05-14 17:45:42 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class UsersController < ApplicationController
|
|
|
|
|
def index
|
|
|
|
|
STDOUT.print("__NYX_SINK_HIT__\n")
|
2026-05-26 12:59:02 -05:00
|
|
|
payload = params[:payload].to_s
|
2026-05-14 17:45:42 -05:00
|
|
|
out = `echo hello #{payload}`
|
|
|
|
|
STDOUT.print(out)
|
2026-05-26 12:59:02 -05:00
|
|
|
render plain: out
|
2026-05-14 17:45:42 -05:00
|
|
|
end
|
|
|
|
|
end
|