News for hackers. Stuff that matters.
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by matthuggins on Monday January 28, 2013 @04:26PM (#5130757)
Can someone explain the security issue in more detail? Is it that I can supply Symbols (and other Ruby objects) in my YAML, which normally can't be included in JSON? That seems to be the basis of it, but I'm looking for more info if available.
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by jmillikin on Monday January 28, 2013 @04:29PM (#5130770)
The Rails YAML parser allows execution of arbitrary Ruby code, by design. If an attacker can figure out how to get input into the YAML parser, they win.
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by tveita on Monday January 28, 2013 @04:55PM (#5130922)
That's awful.

This seems to be something of a theme with RoR. XML parsers that parse YAML, JSON parsers that parse YAML, YAML parsers that parse Ruby...

Why would they let that mess near user input? I thought Ruby included a proper JSON parser now.

Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by knowtheory on Monday January 28, 2013 @05:01PM (#5130952)
It does now. But it didn't in versions <3.1.
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by postmodern_mod3 on Monday January 28, 2013 @07:48PM (#5131704)
YAML does not allow execution of arbitrary Ruby code. Some YAML types allow specifying a custom class, which the Psych YAML parser (default in Ruby 1.9) will call the initialize or []= methods. If you can find a class that eventually evals() input passed to initialize or []=, then you win. http://ronin-ruby.github.com/blog/2013/01/09/rails-pocs.html
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by postmodern_mod3 on Monday January 28, 2013 @06:45PM (#5131497)
Checkout the lengthy write-up for the original vulnerability. http://ronin-ruby.github.com/blog/2013/01/09/rails-pocs.html
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by matthuggins on Tuesday January 29, 2013 @09:56AM (#5134277)
Thanks for the link, but it looks like that's for CVE-2013-0156 and CVE-2013-0155. This HN post is about CVE-2013-0333. It does look like there's a newer blog post about this issue though: http://ronin-ruby.github.com/blog/2013/01/28/new-rails-poc.h...
Re:Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3 by postmodern_mod3 on Tuesday January 29, 2013 @07:28PM (#5137338)
Took a while to write a new blog post. Still, CVE-2013-0333 relies on the same YAML deserialization technique as CVE-2013-0156, so all the previous information is still relevant.