Last modified: 2006-11-14 20:29:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7888 - XSS on search form
XSS on search form
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: High critical (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-11-12 17:38 UTC by mesca
Modified: 2006-11-14 20:29 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description mesca 2006-11-12 17:38:04 UTC
It is possible to conduct a cross-site-scripting attack against the search page
when it displays Google and Yahoo search forms. There is a lack of validation
before returning the original query to the user.

It seems that only French, Dutch and Russian pages are displaying Google and
Yahoo search forms.

Attack vector


Filter :)
Comment 1 Rob Church 2006-11-12 18:55:35 UTC
Confirmed, though haven't identified if it's the Lucene extension, the built-in
search or something special about the fallback behaviour at the moment. Looking now.
Comment 2 Rob Church 2006-11-12 19:18:23 UTC
Aha. seems to have a useful
little hack (do a find in your browser for "yahooSearch") which contains the
Comment 3 Brion Vibber 2006-11-14 00:59:47 UTC
I've corrected the bad JS code on these sites.

Comment 4 Rob Church 2006-11-14 08:44:08 UTC
Another vote against custom JavaScript. Sadly, administrators are not
necessarily l33t script writers as well...
Comment 6 Brion Vibber 2006-11-14 16:39:50 UTC
Man, I have JavaScript's class library (such as it is). String's replace() method only replaces the first occurance 
by default. *boggle*

Comment 7 dake 2006-11-14 20:28:48 UTC
>Another vote against custom JavaScript. Sadly, administrators are not
>necessarily l33t script writers as well...

Well, how long have we been waiting for a better search page ? Administrators
are just patching :) Though for that XSS stuff I plead 100% guilty, I completely
forgot the XSS issue. Another piece of code I made, the array generator
("popupTableau") is more secure (I hope) as inputs go through JS parsing functions. 
Comment 8 dake 2006-11-14 20:29:37 UTC
btw. Brion is right, JS sucks.

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