Bug 1046642 (CVE-2013-6459)

Summary: CVE-2013-6459 rubygem-will_paginate: XSS vulnerabilities
Product: [Other] Security Response Reporter: Ratul Gupta <ratulg>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: apevec, athomas, bkearney, chrisw, clalancette, cpelland, cvsbot-xmlrpc, gkotton, jjoyce, jmassaguerpla, jschluet, katello-bugs, lhh, lpeer, markmc, mburns, mfojtik, mmccune, rbryant, sclewis, srevivo, tdecacqu, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-will_paginate 3.0.5 Doc Type: Bug Fix
Doc Text:
It was found that ruby will_paginate is vulnerable to a XSS via malformed input that cause pagination to occur on an improper boundary. This could allow an attacker with the ability to pass data to the will_paginate gem to display arbitrary HTML including scripting code within the web interface.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-20 10:42:47 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: 1046644, 1469877, 1482582    
Bug Blocks: 1046645    

Description Ratul Gupta 2013-12-26 12:29:27 UTC
Cross-Site Scripting (XSS) vulnerabilities were found in will_paginate gem for Ruby, where certain input related to generated pagination links were not properly sanitised before being returned. This could 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 to be fixed in version 3.0.5.

References:
https://bugs.gentoo.org/show_bug.cgi?id=495220

Original Advisory:
https://github.com/mislav/will_paginate/releases/tag/v3.0.5

Comment 1 Ratul Gupta 2013-12-26 12:30:40 UTC
Created rubygem-will_paginate tracking bugs for this issue:

Affects: fedora-all [bug 1046644]

Comment 2 Ratul Gupta 2013-12-27 05:16:17 UTC
CVE Request:
http://seclists.org/oss-sec/2013/q4/550

Comment 3 Vít Ondruch 2014-01-02 12:53:04 UTC
This [1] is the only commit in 3.0.5 which seems to be relevant to this CVE. If that is true, than this CVE does not affect Ruby on Rails applications, while it might affects Sinatra or Padrino applications (but Padrino is not available in Fedora). 


[1] https://github.com/mislav/will_paginate/commit/4cb4986d5ce05aa84572b05cfd1c1d0aa9bc07df

Comment 4 Jordi Massaguer Pla 2014-01-09 16:19:54 UTC

(In reply to Vít Ondruch from comment #3)
> This [1] is the only commit in 3.0.5 which seems to be relevant to this CVE.
> If that is true, than this CVE does not affect Ruby on Rails applications,
> while it might affects Sinatra or Padrino applications (but Padrino is not
> available in Fedora). 
> 
> 
> [1]
> https://github.com/mislav/will_paginate/commit/
> 4cb4986d5ce05aa84572b05cfd1c1d0aa9bc07df

what about this one?

https://github.com/mislav/will_paginate/commit/c62c6f68a5e5e00a13ded984a4a3a79b41f9ce4b

Comment 5 Vít Ondruch 2014-01-10 08:23:15 UTC
(In reply to Jordi Massaguer Pla from comment #4)
> what about this one?
> 
> https://github.com/mislav/will_paginate/commit/
> c62c6f68a5e5e00a13ded984a4a3a79b41f9ce4b

Good catch. Interestingly, I am not aware I would ever see this commit ... Anyway, will add it into the package. Thanks!

Comment 6 Jordi Massaguer Pla 2014-01-10 10:19:00 UTC
I've asked upstream about it. See comments on commit

https://github.com/mislav/will_paginate/commit/c62c6f68a5e5e00a13ded984a4a3a79b41f9ce4b#commitcomment-5024366

and upstream has confirmed this is the commit.

Comment 7 Vít Ondruch 2014-01-10 11:51:36 UTC
(In reply to Jordi Massaguer Pla from comment #6)
Yes, I saw it. Thank you for heads up.

BTW I already fixed the Fedora builds.

Comment 8 Fedora Update System 2014-01-21 05:52:41 UTC
rubygem-will_paginate-3.0.4-5.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-01-21 05:55:06 UTC
rubygem-will_paginate-3.0.4-5.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 errata-xmlrpc 2018-02-21 12:26:08 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.3 for RHEL 7

Via RHSA-2018:0336 https://access.redhat.com/errata/RHSA-2018:0336