YAML.load or Oj in object mode on untrusted input can instantiate arbitrary Ruby objects.
Use YAML.safe_load or Oj with :strict mode to reject arbitrary object instantiation.