Skip to content
SQL injection Disclosed report

(Blind?) SQL injection vulnerability in statistics of a specific addon

Patrick B***** Follow

Originally disclosed on Mozilla

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

While viewing the statistics of a specific addon, a user could manipulate the
Addon-ID in the URL, to inject SQL Code.
Afaik, its only possible to blindly inject sql code:
https://addons.mozilla.org/de/statistics/addon/6826%20AND%20SUBSTRING%28version%28%29,1,1%29=5
This code gets the mysql-version and compares the first char (5) to "5".
If you try:
https://addons.mozilla.org/de/statistics/addon/6826%20AND%20SUBSTRING%28version%28%29,1,1%29=4
the statistics dont load -> the statement was false -> the version isnt 4.*

Reproducible: Always

Steps to Reproduce:
1. Go to https://addons.mozilla.org/de/statistics/
2. Select any Addon with public statistics
3. Add an apostrophe at the end of the URL after the Addon-ID
4. The statistics is set to zero -> Error in the MySQL Statement
5. Add "AND 1=1" after the Addon-ID without an apostrophe-> The statistics loads perfectly -> the MySQL Statement was successful
6. Replace the "AND 1=1" with "AND 1=0" -> This condition is false -> The MySQL statement fails -> Statistics are zero again.
Actual Results:  
-> It shows, that it's possible to inject SQL Code - a blackhat might be able to read userdata like passwords and manipulate the DB and stuff like this.

Expected Results:  
Filtered the injected code, validate the ID to be integer with a function like intval() or something.

The original report as published on Mozilla's Bugzilla, by Patrick B*****. 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 SQL injection bug in Statistics. Mozilla made it public on 16 December 2010.

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.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.