Skip to content
XSS Disclosed report

Arbitrary PHP Execution / XSS on support.mozilla.com

Neal Poole Follow

Originally disclosed on Mozilla

  • Fixed in 9 hours
  • Paid in 2.9 years
  • Disclosed after 9 hours
Text
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Build Identifier: 

I discovered that it is possible to upload arbitrary PHP scripts to support.mozilla.com using image upload facilities. A malicious PHP script can be embedded in the "comments" of a GIF: the file itself will be a valid GIF but the PHP parser will treat the code inside it as valid.

My first attempt was to upload a file via the profile image upload system: I was able to upload a file with a .php extension (I shouldn't be allowed to do that). However, the system converts files from GIF to JPEG, which wiped out my comments. I didn't take the time to see if there was a way to get around that system.

My next (and successful) attempt was via the "Add an image to a question" functionality. I submitted a POST to https://support.mozilla.com/en-US/upload/image/questions.Question/770771 containing a malicious but valid GIF file (favicon12345.php) with embedded PHP (<?php passthru('whoami') ?>). The file also included a simple XSS test (<script>alert('a')</script>). To my surprise, the file uploaded without any issues and I could browse to it and see the results (an alert box and "apache" in the text of the GIF). It would be trivial for me to turn this exploit into a remote shell into the system (replace 'whoami' with $_GET['c'] in the example above)

Reproducible: Always

Steps to Reproduce:
1. Find GIF file
2. Use Imagemagick or similar utility to add PHP code
3. Rename file to end in .php
4. Upload to support.mozilla.com
5. Browse to the file directly, see code execution

The original report as published on Mozilla's Bugzilla, by Neal Poole. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A XSS bug in Knowledge Base Software. Mozilla made it public on 16 December 2010.

About XSS

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Neal Poole

View all

7 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.