|
|
|
|
|
by IanCal
4698 days ago
|
|
I think he's referring to the rails YAML exploit [0] because you can use yaml to create objects, like this: --- !ruby/hash:ActionDispatch::Routing::RouteSet::NamedRouteCollection
'foo; eval(eval(puts '=== hello there'.inspect);': !ruby/object:OpenStruct
table:
:defaults: {}
Allowing people to run arbitrary code on rails servers.[0] http://rubysource.com/anatomy-of-an-exploit-an-in-depth-look... |
|
But for over the wire communication, JSON makes more sense than YAML, not only because parsing unsafe YAML from an untrusted client could cause exploits like you mentioned, but also because YAML is dependent on indentation and line breaks, and therefore makes communication with the client side much more awkward than just sending JSON to the client or receiving JSON from it.