<<< Date Index >>>     <<< Thread Index >>>

SQL Injection in Oracle package MDSYS.SDO_LRS



Name          SQL Injection in package MDSYS.SDO_LRS (7569081) [DB13]
Systems Affected        Oracle 9i Rel. 2
Severity        High Risk
Category        SQL Injection
Vendor URL      http://www.oracle.com/
Author  Alexander Kornbrust (ak at red-database-security.com)
Advisory        18 October 2006 (V 1.00)
Advisory    
http://www.red-database-security.com/advisory/oracle_sql_injection_sdo_lrs.html

Details
#######
The package MDSYS.SDO_LRS contains a SQL injection vulnerability in the first 
parameter of convert_to_lrs_layer. Oracle forgot to fix this problem with the 
April CPU. Oracle fixed these vulnerabilities with the package DBMS_ASSERT. To 
exploit this vulnerability it is necessary to have the privilege to create a 
PL/SQL-function.


Sample
######
After running the following SQL statement
   select sdo_lrs.convert_to_lrs_layer('"'' or 5=5--''"','RDS','A',1,1,1,1) 
from dual;

The following SQL statement will be executed by Oracle:
 
  SELECT COUNT(*) FROM USER_SDO_INDEX_INFO WHERE TABLE_NAME = '"' OR 5=5--'"' 
AND COLUMN_NAME = 'RDS'


Patch Information
#################
Apply the patches for Oracle CPU October 2006.


History
#######
19-apr-2006 Oracle secalert was informed
18-oct-2006 Oracle published CPU October 2006 [DB13]
18-oct-2006 Advisory published


Additional Information
######################
An analysis of the Oracle CPU Oct 2006 is available here 
http://www.red-database-security.com/advisory/oracle_cpu_oct_2006.html