Last modified: 2013-09-05 17:00:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54746, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52746 - XSS in MediaWiki API (through invalid property name) reintroduced in 1.21.1
XSS in MediaWiki API (through invalid property name) reintroduced in 1.21.1
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://ossdepot.v-front.de/wiki/api%...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 10:12 UTC by Andreas Peetz
Modified: 2013-09-05 17:00 UTC (History)
8 users (show)

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


Attachments
Patch with unit test (963 bytes, patch)
2013-08-14 00:19 UTC, Tim Starling
Details

Description Andreas Peetz 2013-08-12 10:12:37 UTC
It looks like bug #28534 was re-introduced in MediaWiki 1.21.1.
Test URL: http://ossdepot.v-front.de/wiki/api%2Ephp?action=query&meta=siteinfo&format=json&siprop=%3Cbody%20onload=alert(document.cookie)%3E.shtml (This is a fresh 1.21.1 installation).

This was detected by a security scan via scanmyserver.com and confirmed by their support.
Comment 1 Andre Klapper 2013-08-13 11:51:26 UTC
[Note to Security team: This Bugzilla ticket got filed under "MediaWiki" instead of "Security" product and hence is already known to the public, e.g. via http://article.gmane.org/gmane.org.wikimedia.mediawiki.bugs/359688 .  Maybe also because http://www.mediawiki.org/wiki/Security does not mention Bugzilla? :-/ ]
Comment 2 Chris Steipp 2013-08-13 18:39:10 UTC
I'm not sure if this is a regression, since that code hasn't changed much since Tim's patch for 28534. If you change the reported url to alert(1), as the issue was reported in 28524, instead of alert(document.cookie), you correctly get the IE redirect.

I'm not sure if it was intentional in that patch or not, but it seems (to me) that findIE6Extension doesn't correctly detect the extension if there are an even number of . characters in the url, since $pos = $nextPos + 1; will walk past the second . character, and then not detect that there was a . followed by legal characters.

If that wasn't intentional, then changing that to $pos = $nextPos; should fix the issue.
Comment 3 Tim Starling 2013-08-14 00:19:14 UTC
Created attachment 13095 [details]
Patch with unit test

Confirmed XSS on mediawiki.org in IE6. Skipping the character after a dot is definitely unintentional.
Comment 4 Andreas Peetz 2013-08-18 14:06:27 UTC
Thanks, I applied the patch to my installation, and the scanmyserver.com service does no longer detect this issue.

(In reply to comment #3)
> Created attachment 13095 [details]
> Patch with unit test
> 
> Confirmed XSS on mediawiki.org in IE6. Skipping the character after a dot is
> definitely unintentional.
Comment 5 Gerrit Notification Bot 2013-09-03 22:10:54 UTC
Change 82528 had a related patch set (by Tim Starling) published:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82528
Comment 6 Gerrit Notification Bot 2013-09-03 22:18:22 UTC
Change 82528 merged by jenkins-bot:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82528
Comment 7 Gerrit Notification Bot 2013-09-03 22:34:42 UTC
Change 82536 had a related patch set uploaded by CSteipp:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82536
Comment 8 Gerrit Notification Bot 2013-09-03 22:34:52 UTC
Change 82538 had a related patch set uploaded by CSteipp:
SECURITY: Sanitize ResourceLoader exception messages

https://gerrit.wikimedia.org/r/82538
Comment 9 Gerrit Notification Bot 2013-09-03 22:39:19 UTC
Change 82540 had a related patch set uploaded by CSteipp:
SECURITY: Sanitize ResourceLoader exception messages

https://gerrit.wikimedia.org/r/82540
Comment 10 Gerrit Notification Bot 2013-09-03 22:39:28 UTC
Change 82542 had a related patch set uploaded by CSteipp:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82542
Comment 11 Gerrit Notification Bot 2013-09-03 22:42:41 UTC
Change 82544 had a related patch set uploaded by CSteipp:
SECURITY: Sanitize ResourceLoader exception messages

https://gerrit.wikimedia.org/r/82544
Comment 12 Gerrit Notification Bot 2013-09-03 22:42:49 UTC
Change 82546 had a related patch set uploaded by CSteipp:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82546
Comment 13 Gerrit Notification Bot 2013-09-03 22:54:27 UTC
Change 82536 merged by CSteipp:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82536
Comment 14 Gerrit Notification Bot 2013-09-03 23:16:26 UTC
Change 82540 merged by jenkins-bot:
SECURITY: Sanitize ResourceLoader exception messages

https://gerrit.wikimedia.org/r/82540
Comment 15 Gerrit Notification Bot 2013-09-03 23:20:10 UTC
Change 82544 merged by jenkins-bot:
SECURITY: Sanitize ResourceLoader exception messages

https://gerrit.wikimedia.org/r/82544
Comment 16 Gerrit Notification Bot 2013-09-03 23:23:18 UTC
Change 82538 merged by jenkins-bot:
SECURITY: Sanitize ResourceLoader exception messages

https://gerrit.wikimedia.org/r/82538
Comment 17 Gerrit Notification Bot 2013-09-04 00:32:55 UTC
Change 82546 merged by jenkins-bot:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82546
Comment 18 Gerrit Notification Bot 2013-09-04 03:55:44 UTC
Change 82542 merged by jenkins-bot:
SECURITY: Fix extension detection with 2 .'s

https://gerrit.wikimedia.org/r/82542
Comment 19 Andre Klapper 2013-09-04 09:22:14 UTC
[restoring RESOLVED FIXED state which was set before the Gerrit Notification Bot inserted links to the Gerrit patchsets]
Comment 20 Chris Steipp 2013-09-05 17:00:44 UTC
This issue was assigned CVE-2013-4303

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


Navigation
Links