Last modified: 2012-04-12 13:54:49 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 T29093, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27093 - CSS injection vulnerability (comment stripping)
CSS injection vulnerability (comment stripping)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Normal critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-01 22:11 UTC by Tim Starling
Modified: 2012-04-12 13:54 UTC (History)
3 users (show)

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


Attachments

Description Tim Starling 2011-02-01 22:11:38 UTC
Security researcher mghack discovered a CSS injection vulnerability. Incorrect parsing of CSS comments allows dangerous tokens such as expression() and url() to be passed through to the browser. 

The vulnerability affects all previous versions of MediaWiki. A fix will be released shortly in MediaWiki 1.16.2. If patches are available for earlier major versions, it will be noted in a comment below. 

Our fix involves:

* A patch to StringUtils::delimiterReplaceCallback() which fixes the logic error.
* A patch to Sanitizer::checkCss() which removes any remaining comment-start tokens, thus preventing any possible confusion over their interpretation.

Either of these patches would have fixed the problem alone.

This vulnerability was originally reported to the Mozilla Security Group and has been assigned CVE-2011-0047.
Comment 1 Platonides 2011-02-02 18:19:50 UTC
Fixed in r81332
Comment 2 Krinkle 2011-02-02 18:23:38 UTC
Since CodeReview only tags forward and not backwards with common "bug #" in the commit message, also naming the following revision in which it was fixed in trunk:

r81330 trunk
r81331 1.17
r81332 1.16
r 81333 1.15

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


Navigation
Links