Secunia Logo
 
Php-Stats SQL Injections and PHP Code Execution
Secunia Advisory: SA24553
Release Date: 2007-03-19
Last Update: 2007-03-26
Popularity: 4,909 views

Critical:
Highly critical
Impact: Manipulation of data
System access
Where: From remote
Solution Status: Unpatched

Software:Php-Stats 0.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2006-7172
CVE-2006-7173


Description:
rgod has reported some vulnerabilities in Php-Stats, which can be exploited by malicious people to conduct SQL injection attacks or compromise a vulnerable system.

1) Input passed to the "PC-REMOTE-ADDR" HTTP header in php-stats.recphp.php is not properly sanitised before being used in a SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

2) Input passed to the "ip" parameter in php-stats.recphp.php is not properly sanitised before being used in a SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

Successful exploitation requires that the "accept_ssi" option is enabled.

3) Input passed to "report_w_day" option is not properly sanitised before being stored in the /option/php-stats-options.php file. This can be exploited to inject and execute arbitrary PHP code.

Successful exploitation requires the administrator password, which can be gained by exploiting vulnerability #1 or #2.

The vulnerabilities are reported in version 0.1.9.1b. Other versions may also be affected.

Solution:
Edit the source code to ensure that input is properly sanitised.

Provided and/or discovered by:
rgod

Changelog:
2007-03-26: Added CVE reference.

Original Advisory:
http://milw0rm.com/exploits/3496
http://milw0rm.com/exploits/3497
http://milw0rm.com/exploits/3502


Track this Secunia Advisory
Customers of the Secunia Vulnerability Intelligence solutions will automatically receive updates when new information regarding this advisory is released.

Read more about our Vulnerability Intelligence solutions and what they can do for you and your company.

About this Secunia Advisory
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.

Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
  
Latest Advisories

Send Feedback to Secunia
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.

Ideas, suggestions, and other feedback are most welcome.

Most Popular - 3 Hours

1. Apple iPhone / iPod touch Multiple Vulnerabilities // 31 views
2. Sun Java JDK / JRE Multiple Vulnerabilities // 23 views
3. Adobe Flash Player Multiple Security Issues and Vulnerabilities // 22 views
4. Microsoft Word Smart Tag Invalid Length Processing Vulnerability // 22 views
5. vBulletin Visitor Messages Script Insertion Vulnerability // 20 views
6. xt:Commerce SQL Injection Vulnerability // 19 views
7. Fedora update for thunderbird // 19 views
8. Checkpoint VPN-1 Information Disclosure Vulnerability // 19 views
9. SemanticScuttle Cross-Site Scripting Vulnerabilities // 18 views
10. Easyedit CMS Multiple SQL Injection Vulnerabilities // 18 views