|
|||||||||||
|
Oracle Security: SQL Injection in APEX CHECK_DB_PASSWORD
From: <ak(at)red-database-security.com>
Date: Wed Jul 18 2007 - 01:57:14 EDT
#######################################################This advisory <http://www.red-database-security.com/advisory/oracle_apex_sql_injection_check_db_password.html>
Name SQL Injection Vulnerability in Oracle CHECK_DB_PASSWORD
Systems Oracle APEX
Author Alexander Kornbrust (ak at red-database-security.com) Date 17 July 2007 (V 1.00)
Details
APEX 3.0.1 is now doing an input validation on the user password. Apex 3.0.1 is used in Oracle 11g. Old, vulnerable code #################### FUNCTION CHECK_DB_PASSWORD (P_USER_NAME VARCHAR2, P_PASSWORD VARCHAR2) RETURN BOOLEAN IS BEGIN IF P_USER_NAME IS NULL OR P_PASSWORD IS NULL THEN RETURN FALSE;END IF; BEGIN EXCEPTION WHEN NO_DATA_FOUND THEN RETURN FALSE;END; BEGIN EXCEPTION WHEN NO_DATA_FOUND THEN RETURN FALSE;END; L_STMT:= 'ALTER USER "' || P_USER_NAME || '" IDENTIFIED BY "' || P_PASSWORD||'"'; EXECUTE IMMEDIATE L_STMT; New code ######## Oracle is now doing a length check of the password (30 characters). Good idea. I'm interested to see if this is changed in 11g where passwords up to 50 characters are allowed. One part of the input validation is stupid code. If the password contains a chr(34) Oracle throws an error message. chr(34) is never executed. Even if this code would be executed this could be bypassed quite easily (e.g. chr( 34) or chr(34 ) or chr(35-1) or ...) FUNCTION CHECK_DB_PASSWORD (P_USER_NAME VARCHAR2, P_PASSWORD VARCHAR2) RETURN BOOLEAN IS
BEGIN
BEGIN
################# This bug is fixed with 3.0.1 of APEX which is not part of the Critical Patch Update July 2006. It's necessary to upgrade your APE installation to 3.0.1 or higher. Apex 3.0.1 is compatible with Oracle Application Express. Patch Information ################# This bug is fixed with Apex 3.0.1 or higher.
History
07-may-2007 Oracle secalert was informed 07-may-2007 Bug confirmed 29-jun-2007 Oracle released APEX 3.0.1 17-jul-2007 Oracle published CPU July 2007 and recommends to update to 3.0.1 17-jul-2007 Red-Database-Security published this advisory Analysis and CVE entries of the Oracle CPU ########################################### <http://www.red-database-security.com/advisory/oracle_cpu_jul_2007.html> (c) 2007 by Red-Database-Security GmbH Received on Wed Jul 18 12:54:54 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 28 2007 - 06:09:41 EDT |
||||||||||
|
|||||||||||