Bug 1297846 - rubygem-rails: XSS vulnerability in the select helper
Summary: rubygem-rails: XSS vulnerability in the select helper
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1297848
TreeView+ depends on / blocked
 
Reported: 2016-01-12 15:38 UTC by Adam Mariš
Modified: 2021-02-17 04:31 UTC (History)
37 users (show)

Fixed In Version: rubygem-rails 3.2.2, rubygem-rails 3.1.4, rubygem-rails 3.0.12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-13 20:09:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Adam Mariš 2016-01-12 15:38:11 UTC
It was reported that when developers generate html options tags manually, user input concatenated with manually built tags may not be escaped and an attacker can inject arbitrary HTML in to the document. Only manually generated select tag options are impacted.

Vulnerable code:

<%= select('post', 'author_id', "<option value='#{user.id}'>#{user.name}</option>") %>

Patches can be found here:

https://groups.google.com/forum/#!msg/rubyonrails-security/CdoMUVpsRmQ/iFRwR1xPym8J

Comment 1 Kurt Seifried 2016-01-13 20:09:18 UTC
Statement:

This issue affects the versions of rubygem-rails as shipped with Red Hat Subscription Asset Manager 1.2. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.


Note You need to log in before you can comment on or make changes to this bug.