English
The Internet threat alert status is currently normal. At present, no major epidemics or other serious incidents have been recorded by Kaspersky Lab’s monitoring service. Internet threat level: 1

Ruby on Rails Two Cross-Site Scripting Vulnerabilities


Secunia ID

SA48241

CVE-ID

CVE-2012-1098, CVE-2012-1099

Release Date

02 Mar 2012

Last Change

20 Mar 2012

Criticality

Less Critical

Solution Status

Vendor Patch

Software

Ruby on Rails 3.0.x
Ruby on Rails 3.1.x
Ruby on Rails 3.2.x

Where

From remote

Impact
Cross-Site Scripting

Cross-Site Scripting vulnerabilities allow a third party to manipulate the content or behaviour of a web application in a user's browser, without compromising the underlying system.

Different Cross-Site Scripting related vulnerabilities are also classified under this category, including "script insertion" and "cross-site request forgery".

Cross-Site Scripting vulnerabilities are often used against specific users of a website to steal their credentials or to conduct spoofing attacks.

Description

Two vulnerabilities have been reported in Ruby on Rails, which can be exploited by malicious people to conduct cross-site scripting attacks.

1) Certain input passed via direct manipulations of SafeBuffer 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) Certain input passed via manually generated select tags options 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 vulnerabilities are reported in versions prior to 3.2.2, 3.1.4, and 3.0.12.

Solution

Update to version 3.2.2, 3.1.4, or 3.0.12.

Reported by

The vendor credits:
1) Akira Matsuda
2) Sergey Nartimov

Original Advisory

Ruby on Rails:
http://weblog.rubyonrails.org/2012/3/1/ann-rails-3-2-2-has-been-released
http://groups.google.com/group/rubyonrails-security/browse_thread/thread/edd28f1e3d04e913
http://groups.google.com/group/rubyonrails-security/browse_thread/thread/9da0c515a6c4664