Live data from Hacker News

Multiple vulnerabilities in parameter parsing in Action Pack

groups.google.com

41–50 of 294 posts

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#42

As a newcomer to the Rails ecosystem all these posts of vunlerabilities and open doors leaves a bad taste in my mouth. God know I love programming in Ruby now, but is Rails really that insecure?

All software has bugs, and the subset of bugs which turn out to be security vulnerabilities is borderline asymptotic.

That's not to say all frameworks are created equally secure, but the differences have more to do with the culture around the project than any technical decisions (minus some very specific language-related issues).

Rails is a big, public project; with many years now of being used by a sizable number of people. There will be more security vulnerabilities discovered, hopefully they'll be addressed quickly and communicated well (which this one seems to be).

That's a long-winded way of saying to be cautious with picking some other framework because it has less security vulnerabilities reported, that almost certainly has no bearing on it being more secure.

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#43

I really don't understand the last part "This vulnerability was reported to us by numerous people, many thanks to [...]". Considering it affects all versions, what are the odds of multiple people pointing this out at the same time? Rails has a very good track record regarding these things, but I'm just curious.

> Considering it affects all versions, what are the odds of multiple people pointing this out at the same time?

My understanding is that while investigating the SQL issue a week or so back, it gave several people ideas on how to make this exploit happen, and they all reported it.

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#44

As a newcomer to the Rails ecosystem all these posts of vunlerabilities and open doors leaves a bad taste in my mouth. God know I love programming in Ruby now, but is Rails really that insecure?

Who'd have thought it? Hugely dynamic language turns out to be difficult to audit or analyse for security issues.

It was never about Java(C, C++) vs. Ruby despite what fanboys on either side made out. It was about conservative vs. devil-may-care. All that "convenience" and "it's so clean" came at the price of a whole load of code executed behind the scenes. You didn't write it, and the Gods of TDD preached that you don't need to test it because that's Someone Else's Problem. Auditing it is nearly impossible not least because it's a moving target, so you either get stuck in a backwater of obsolete versions that once got audited and approved or you live on the bleeding edge constantly (and DevOps hate you forever).

FWIW we (large satnav company) prototyped the last major service in Rails (actually a one-man hack proof of concept) then implemented it in production in Scala (and that was a bridge too far for a lot of people) because no-one wanted to run Rails in production.

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#45
Rails noob here... with this and the other vulnerability from a few days ago, do all you need to do is update your rails gem to become safe?

Current version at time of my post is 3.2.11, if I'm using that am I safe or do I need to perform additional steps?

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#46

I really don't understand the last part "This vulnerability was reported to us by numerous people, many thanks to [...]". Considering it affects all versions, what are the odds of multiple people pointing this out at the same time? Rails has a very good track record regarding these things, but I'm just curious.

The last Rails SQLI vulnerability was mitigated by the way ActionPack parsed request parameters, so lots of people dove into that code to see if the mitigation could be evaded with JSON or XML. That gave people incentive to review Rails XML parser wrapper class. The problem with that class is pretty obvious.

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#47

An attacker can execute any ruby code he wants including system("unix command"). This effects any rails version for the last 6 years. I've written POCs for Rails 3.x and Rails 2.x on Ruby 1.9.3, Ruby 1.9.2 and Ruby 1.8.7 and there is no reason to believe this wouldn't work on any Ruby/Rails combination since when the bug has been introduced. The exploit does not depend on code the user has written and will work with…

From the rubyonrails-security list:

https://groups.google.com/forum/#!topic/rubyonrails-security...

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#48

I really don't understand the last part "This vulnerability was reported to us by numerous people, many thanks to [...]". Considering it affects all versions, what are the odds of multiple people pointing this out at the same time? Rails has a very good track record regarding these things, but I'm just curious.

I'd guess multiple people working together, or multiple people who got hit by someone exploiting it in the wild.

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#49
post #5

Before anyone wonders if they're having deja vu, this is different than the SQL injection vulnerability that was discussed 5 days ago: http://news.ycombinator.com/item?id=4999406

I think people went looking for ways to exploit this vulnerability and ending up finding this vulnerability.

Re: Multiple vulnerabilities in parameter parsing in Action Pack

#50
post #40

I'm just commenting here so that people can have a central thread for love / hatred. ;-) But seriously. This is extremely critical, please upgrade!

As there have been many exploits / issues recently realized in parameters parsing, why isn't there more of a focus on security here? Specifically, this is where users/hackers can put ANY DARN THING THEY WANT and your server has to deal with it. As a simple solution, one could pass a signed auth-hash of the fields generated by form_for, and the server could re-hash the fields submitted to ensure the form data you aske…

> why isn't there more of a focus on security here?

More compared to what, exactly? This vulnerability was responded to pretty damn quickly after it was reported, given that almost nobody is even paid to work on Rails. If you saw Aaron tweeting about "working over the weekend" a few days ago, well, now you know.

That said, you mention attr_accessible in your post: that's gone as of the next release of Rails. Basically everyone agrees that strong_parameters is a better approach, which is why a gem was released that works with 3.2: you can use that better approach now.

As was mentioned below, security is a process, not a result. Nobody wants these kinds of issues to happen, but they will happen, and do to every single framework that's used by lots of people.

Post reply on HN