Stored XSS - Upload: "reason" and "otherreason" are not checked
Originally disclosed on Mozilla
- Fixed in 42 days
- Paid in 2.9 years
- Disclosed after 42 days
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b9pre) Gecko/20101218 Firefox/4.0b9pre
Build Identifier:
Whereas the value for "category" is checked against the admin-defined list, "reason" (a "select" element) and "reasonother" (a text input) are written to the database as-is. If I understand correctly, no escaping happens in admin/editing.php when printing these as HTML. I believe this is a source of XSS, thus gaining admin privileges.
Reproducible: Always
Note that I did not set up a local instance of the site, and since I do not have admin privileges on the production site, I had to resort to reading the code.
It prints, among others:
print " (" . $result['reason_other'] . ")";
with $result being:
$result = $db->get_edits_by_id($id);
and $db->get_edits_by_id() simply returning an associative array for:
$statement = 'select * from edits where id = :id';
which returns the record previously stored by:
$db->submit_persona_edit(…);
Please correct me if I am wrong!
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 getpersonas.com. Mozilla made it public on 1 February 2011.
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.