Secunia Logo
Netsikker nu! 2008
 
PHP MSSQL Extension NTWDBLIB.DLL "dbopen" Buffer Overflow
Secunia Advisory: SA24353
Release Date: 2007-03-07
Last Update: 2007-03-14
Popularity: 10,909 views

Critical:
Less critical
Impact: Security Bypass
Where: Local system
Solution Status: Unpatched

Software:PHP 4.4.x
PHP 5.2.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2007-1411


Description:
rgod has discovered a vulnerability in PHP's MSSQL Extension, which can be exploited to bypass certain security restrictions.

The vulnerability is caused due to a boundary error when processing arguments within the "dbopen()" function in NTWDBLIB.DLL located in the PHP directory when the MSSQL extension is installed. This can be exploited to cause a stack-based buffer overflow via an overly long (greater than 260 bytes) string passed as argument to e.g. PHP's "mssql_connect()" or "mssql_pconnect()" functions and execute arbitrary code therefore bypassing security restrictions like the "disable_functions" directive.

Successful exploitation requires that the MSSQL extension is installed.

The vulnerability is reported in PHP 4.4.6 and confirmed in the PHP-5.2.1 win32 installer. Other versions may also be affected.

Solution:
Grant only trusted users access to the affected system.

Provided and/or discovered by:
rgod

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

Original Advisory:
http://retrogod.altervista.org/php_446_mssql_connect_bof.html


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. Trend Micro ServerProtect Multiple Buffer Overflow Vulnerabilities // 34 views
2. Subdreamer Light Global Variables SQL Injection Vulnerability // 32 views
3. PluggedOut Blog "index.php" SQL Injection Vulnerabilities // 27 views
4. CA ARCserve Backup Multiple Vulnerabilities // 25 views
5. Sun Java System Web Proxy Server FTP Subsystem Buffer Overflow // 22 views
6. CUPS Multiple Vulnerabilities // 21 views
7. Gentoo Portage Insecure Python Module Search Path Security Issue // 21 views
8. Apple Mac OS X Security Update Fixes Multiple Vulnerabilities // 20 views
9. DFF PHP Framework API "DFF_config[dir_include]" File Inclusion Vulnerabilities // 20 views
10. Built2go Real Estate Listings "event_id" SQL Injection // 18 views