If you craft some html in the offset variable, you can create an xss attack in the show more link in the facets. Patch to follow
Created attachment 23311 [details] [review] Bug 11341 : XSS in opac-search.pl (facets) prog theme, bootstrap theme is safe To test 1/ Craft a url like cgi-bin/koha/opac-search.pl?idx=kw&q=fish&offset=20" onmouseover%3dprompt(994000) bad%3d" (the search must return enough results to have a show more link in the facets) 2/ Check the source, or mouseover the Show more links in the facets Notice the code is executable 3/ Apply patch - notice it is no longer executable
Created attachment 23312 [details] [review] Bug 11341 : XSS in opac-search.pl (facets) prog theme, bootstrap theme is safe To test 1/ Craft a url like cgi-bin/koha/opac-search.pl?idx=kw&q=fish&offset=20" onmouseover%3dprompt(994000) bad%3d" (the search must return enough results to have a show more link in the facets) 2/ Check the source, or mouseover the Show more links in the facets Notice the code is executable 3/ Apply patch - notice it is no longer executable Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Created attachment 23313 [details] [review] [PASSED-QA] Bug 11341 : XSS in opac-search.pl (facets) prog theme, bootstrap theme is safe To test 1/ Craft a url like cgi-bin/koha/opac-search.pl?idx=kw&q=fish&offset=20" onmouseover%3dprompt(994000) bad%3d" (the search must return enough results to have a show more link in the facets) 2/ Check the source, or mouseover the Show more links in the facets Notice the code is executable 3/ Apply patch - notice it is no longer executable Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Pushed to master. Thanks, Chris!
This patch has been pushed to 3.14.x, will be in 3.14.1
This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Chris!