shopify-scripts · Report #181871
DoS: type confusion in mrb_no_method_error
Validstatus
criticalseverity
60upvotes
1 Mar 2017disclosed
How it was found
Overwriting the 'new' method of the NoMethodError singleton to not return an exception object leads to memory corruption and possibly arbitrary code execution.
Running the following code under the mruny-engine sandbox script results in a native crash: NoMethodError.define_singleton_method(:new) do "waat" end Object.q
Attached is a patch to mitigate the issue.