News for hackers. Stuff that matters.
Re:Hacked: commit to rails master on GitHub by lgeek on Sunday March 04, 2012 @02:14PM (#3663580)
In the case of Diaspora it was a less subtle and more obvious issue. They just weren't checking for authorization, as in:

    def destroy
      @album = Album.find_by_id params[:id]
      @album.destroy
      [...]
    end
when the second line should have been something like:

    user.albums.find_by_id params[:id]
But, well, they're both pretty bad mistakes.
Re:Hacked: commit to rails master on GitHub by patio11 on Sunday March 04, 2012 @05:31PM (#3664354)
Nope, Diaspora also had this exact issue, which would let you use anything where a params hash updated a user model to e.g. overwrite their credentials or encryption keys. The specific exploitable example I found would have let you do it even if they had been checking authorization to update objects properly, because the attacker could reassign his own objects as the victim's objects with arbitrary attack payloads, one of which being sufficient to compromise the victim's account.

When I wrote a journal article about it my recommendation was that Rails ship with

ActiveRecord::Base.attr_accessible(nil)

by default, because otherwise vulnerabilities of that nature were virtually inevitable.

Re:Hacked: commit to rails master on GitHub by zdouglas on Sunday March 04, 2012 @03:03PM (#3663763)
Palpability is in the eye of the beholder. There's a lot of talk in the GH issue comments dismissing GH's "obvious" failure of not using `attr_accessible`.