Description: Some vulnerabilities have been reported in Ruby on Rails, which can be exploited by malicious people to disclose sensitive information and conduct cross-site scripting attacks.
1) 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.
2) An error in ActiveResource when processing responses using the "Hash.from_xml" function can be exploited to determine the existence of files and to read the contents of arbitrary XML files.
The vulnerabilities are reported in version 1.2.3. Other versions may also be affected.
Note: Ruby on Rails allows users to pass their session ID via a URL parameter, which may be used to conduct session fixation attacks. This functionality has been disabled in version 1.2.4 and later.
Solution: Update to version 1.2.5.
Provided and/or discovered by: 1) BCC
2) candlerb
Changelog: 2007-10-18: Updated "Solution" section. Added link to "Original Advisory" section.
2007-10-24: Added vulnerability #2 to "Description" section and added link to "Original Advisory" section. Added CVE reference.
2007-11-15: Added CVE reference and note about potential session fixation risk.
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.
Ideas, suggestions, and other feedback are most welcome.