Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 182223
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Pierre-Yves Rofes <py@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 182223 depends on: 194838 195315 Show dependency tree
Bug 182223 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-06-16 15:04 0000
BCC has reported a vulnerability in Ruby on Rails, which can be exploited by
malicious people to conduct cross-site scripting attacks.

Input passed to the "to_json" function is not properly sanitised before being
returned to the user. This can be exploited to execute arbitrary HTML and
script code in a user's browser session in context of an affected site.

The vulnerability is reported in version 1.2.3. Other versions may also be
affected.

Solution:
Fixed in the SVN repository (Changeset 6893/6894).
http://dev.rubyonrails.org/changeset/6893
http://dev.rubyonrails.org/changeset/6894

------- Comment #1 From Pierre-Yves Rofes 2007-06-16 15:06:16 0000 -------
setting status and cc'ing herd. ruby, please advise.

------- Comment #2 From Josh Nichols (RETIRED) 2007-06-19 13:09:12 0000 -------
This is affecting dev-ruby/activesupport specifically.

Currently, we package rails and company from gem files. The issue here is that
we don't really have much room to patch, without mangling the gem, and
reassembling it. I poked around at doing that before, but didn't have much luck
with reassembling.

Another approach would be to switch to source, and do 'rake gem' to generate
the gem as upstream would do. The only issue here is that the tgz download for
activesupport doesn't actually include the Rakefile needed to do that kind of
thing. To get around that, theoretically, should be able to take a svn
'snapshot' of the 1.2.3 release tag, and go from there.

------- Comment #3 From Hans de Graaff 2007-06-21 17:52:01 0000 -------
I haven't seen any mention of this bug on the rails-core mailing list, nor on
the rails mailing list. So while it is considered a bug, upstream doesn't
really seem to consider it a security issue. Last time there was a security
issue the Rails team was pretty quick in releasing a new version. That's not to
say we shouldn't fix this, but the sense of urgency seems to be low.

Original bug report here: http://dev.rubyonrails.org/ticket/8371

------- Comment #4 From Richard Brown (RETIRED) 2007-06-22 19:50:05 0000 -------
The patch also won't apply to 1.4.2, because they've restructured the code in
that area.

------- Comment #5 From Sune Kloppenborg Jeppesen 2007-06-23 18:07:00 0000 -------
Seems like it would be best to wait for upstream. ruby please comment once a
fix has been released.

------- Comment #6 From Pierre-Yves Rofes 2007-09-22 18:59:39 0000 -------
According to http://dev.rubyonrails.org/ticket/8371, bug has been fixed
upstream.
In the meanwhile, version 1.3.1 seems stable on all arches. Is this fixed in
this versions so we can move directly to the glsa vote? Ruby, please advise.

------- Comment #7 From Richard Brown (RETIRED) 2007-09-22 21:14:35 0000 -------
version 1.2.3 refers to rails itself. The version of activesupport that was
released for that version was 1.4.2, they still haven't released a fixed
version.

------- Comment #8 From Hans de Graaff 2007-10-05 09:58:14 0000 -------
Rails 1.2.4 just got released that allegedly fixes this issue:

* Changed the JSON encoding algorithms to avoid otential XSS issues when using
ActiveRecord::Base#to_json

------- Comment #9 From Robert Buchholz 2007-10-05 12:26:15 0000 -------
ruby, please advise.

------- Comment #10 From Hans de Graaff 2007-10-06 16:38:58 0000 -------
Rails 1.2.4 is now in the tree, but I would prefer to wait at least a week
before starting to make it stable and thus resolve this security bug. Breaking
people's web services seems to be worse than fixing this bug one week sooner.

------- Comment #11 From Hans de Graaff 2007-10-10 05:35:19 0000 -------
Rails 1.2.4 fixes more security issues than just the JSON problem, see bug
#195315

------- Comment #12 From Sune Kloppenborg Jeppesen 2007-10-14 07:39:29 0000 -------
Hans, is it ready for stable marking now?

------- Comment #13 From Hans de Graaff 2007-10-14 08:03:51 0000 -------
We should be marking rails 1.2.5 stable, and this is tracked in #195315. We
should probably close this bug and track the issue on the Rails 1.2.5 bug. My
current plan is to ask for stabilization of 1.2.5 on Monday morning unless
something comes up in the meantime.

------- Comment #14 From Hans de Graaff 2007-10-16 06:57:35 0000 -------

*** This bug has been marked as a duplicate of bug 195315 ***

------- Comment #15 From Robert Buchholz 2007-10-16 07:12:30 0000 -------
Please don't close security bugs, even if they might be redundant. We need them
open to handle advisories.

------- Comment #16 From Pierre-Yves Rofes 2007-11-14 21:22:57 0000 -------
GLSA 200711-17, sorry for the delay.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug