Problem/Motivation
A compromised user with the restricted permission, Administer Views, can create a XSS attack for views using Grouped Filters exposed form.
Note: this is a publicly-disclosed vulnerability because it only affects a restricted permission. @kevee, see security issue #151353.
Proposed resolution
- Filter options when displaying $group.
- Filter options for select list options.
Remaining tasks
- Needs work to hide no-groups?
Original report by mradcliffe
You can see this vulnerability by:
1. Enabling the module
2. As a user with Administer Views permission.
3. Create a view with exposed filters and a page display.
4. Enable the Grouped Filters exposed form on the view.
5. Add
alert('aaa');
as the name of a Group in the exposed form settings.
6. Click Apply.
7. Save the view and browse to the path for the page display.
8. The JavaScript is executed on the page
Comments
Comment #1
mradcliffeForgot to add tag.
Comment #2
mradcliffeComment #3
mradcliffeAdjusted issue summary.
Comment #4
mradcliffeIt looks like I may have added some CSS to hide "no-group", but on a clean site this looks odd as No Group is in its own fieldset.
I'll need some time to look at this again.
Comment #5
mradcliffeFound the regression.
The no-group filters need to be completely outside of the
$form['filters']element. Probably a good idea to separate them anyway. This may have some breaking markup changes, but it seems to look good for me.Comment #8
mradcliffeFixed. Credited @klausi for initial review from several years ago.