Skip to content
SQL injection Disclosed report

SQL Injection in communitystore.mozilla.org (Revision 88447)

Gianni Gnesa Follow

Originally disclosed on Mozilla

  • Fixed in 38 days
  • Paid in 2.5 years
  • Disclosed after 38 days
Text
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102814 Ubuntu/8.10 (intrepid) Firefox/3.0.15
Build Identifier: Revision 88447

SQL Injection in the models/upload.class.php file.

Reproducible: Didn't try


Actual Results:  
I haven't tried to exploit the vulnerability. However, it may allow to extract all the information from the DB and eventually also to create a PHP shell with an INTO OUTFILE query.


The function findBySecret, which is defined in the file models/upload.class.php file, uses the key variable to store a sanitized version of its parameter ($secret)[line 290], but then this sanitized value is never used. Instead it is used the unsanitized version [line 292].

289      function findBySecret($secret) {
290          $key = $this->db->real_escape_string($secret);
291
292          $sql = sprintf("SELECT * FROM uploads WHERE secret = '%s'", $secret);
293          $res = $this->db->query($sql);
   ...
299      }

To fix the problem, it should be used the $key variable instead of the unsanitized $secret variable.

The original report as published on Mozilla's Bugzilla, by Gianni Gnesa. 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 communitystore.mozilla.org. Mozilla made it public on 15 June 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.

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.