Secunia Logo
Netsikker nu! 2008
 
Php-Stats SQL Injections and PHP Code Execution
Secunia Advisory: SA24553
Release Date: 2007-03-19
Last Update: 2007-03-26
Popularity: 4,738 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

Today
New advisories: 8
New vulnerabilities: 27
Updated advisories: 11

Highly // 106 views
Opera Multiple Vulnerabilities
Moderately // 86 views
Red Hat update for condor
Moderately // 85 views
Condor Multiple Vulnerabilities
Moderately // 104 views
Gentoo update for wordnet
Moderately // 122 views
Red Hat update for kernel

7th Oct, 2008
New advisories: 19
New vulnerabilities: 68
Updated advisories: 61

Moderately // 476 views
Debian update for php5
Moderately // 372 views
Atarone CMS Multiple Vulnerabilities

Solutions | More...  


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. Adobe Flash Player "Clickjacking" Security Bypass Vulnerability // 126 views
2. Red Hat update for kernel // 99 views
3. Gentoo update for wordnet // 89 views
4. Red Hat update for condor // 74 views
5. Condor Multiple Vulnerabilities // 71 views
6. Hero DVD Player M3U Processing Buffer Overflow Vulnerability // 69 views
7. Debian update for php5 // 55 views
8. Zeroboard Multiple Vulnerabilities // 48 views
9. Opera Multiple Vulnerabilities // 45 views
10. Zeroboard Two Vulnerabilities // 40 views