Bug 1297846

Summary: rubygem-rails: XSS vulnerability in the select helper
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: apatters, bkearney, cbillett, ccoleman, cpelland, dajohnso, dclarizi, dmcphers, gblomqui, gmccullo, gtanzill, jfrey, jhardy, jialiu, joelsmith, jokerman, jorton, jprause, jrafanie, katello-bugs, kseifried, lmeyer, mastahnke, mmaslano, mmccomas, mmorsi, mtasaka, obarenbo, pvalena, roliveri, sseago, s, strzibny, tomckay, vanmeeuwen+fedora, vondruch, xlecauch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-rails 3.2.2, rubygem-rails 3.1.4, rubygem-rails 3.0.12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-13 20:09:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1297848    

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/.