Document Title: =============== Cyberoam UTM Appliance - SQL Injection Vulnerability References (Source): ==================== Release Date: ============= 2011-12-18 Vulnerability Laboratory ID (VL-ID): ==================================== 60 Product & Service Introduction: =============================== Small and medium enterprises are as much at risk as large enterprises from the targeted attacks of today. They need to protect their networks effectively from external and internal threats without a large security budget. Cyberoam CR50ia, CR100ia, CR200i and CR300i are powerful identity-based unified threat management appliances, delivering comprehensive protection to small and medium enterprises (SMEs) with limited investment in financial and technical resources. Cyberoam gateway security appliance offers protection from blended threats that include virus, spam, malware, phishing, pharming. Its unique identity-based security based on Layer 8 technology protects enterprises from internal threats that lead to data theft and loss by giving complete visibility into and control over internal users. (Copy of the Vendor Homepage: Abstract Advisory Information: ============================== Vulnerability-Lab Team discovered a SQL Injection Vulnerability on the Cyberoam UTM & Security Appliance. Vulnerability Disclosure Timeline: ================================== 2011-12-19: Public or Non-Public Disclosure Discovery Status: ================= Published Affected Product(s): ==================== Elitecore Technologie Product: Cyberoam UTM Appliance 10.x - CR300i, CR500i & older versions Exploitation Technique: ======================= Remote Severity Level: =============== Critical Technical Details & Description: ================================ A critical SQL Injection vulnerability is detected on the Cyberoam UTM WAF Appliance v10.x. The vulnerability allows an attacker to inject own sql statements on the affected firewall appliance dbms. Remote attackers can takeover the server and compromise the dbms & appliance. Vulnerable Module(s): [+] Controller - (?mode=301&tableid=[[]]&sort=&dir=) --- SQL Error Logs --- java.sql.SQLException: ERROR: each UNION query must have the same number of columns ... java.sql.SQLException: ERROR: UNION types character varying and integer cannot be matched ... java.sql.SQLException: ERROR: ORDER BY position 100 is not in select list java.sql.SQLException: ERROR: ORDER BY position 10 is not in select list java.sql.SQLException: ERROR: ORDER BY position 9 is not in select list java.sql.SQLException: ERROR: ERROR: ORDER BY position 8 org.postgresql.util.PSQLException: No results were returned by the query. <= Columns: 8 ... org.postgresql.util.PSQLException: No results were returned by the query. ... java.sql.SQLException: ERROR: unterminated quoted string at or near and user_id=0 ... {totalRecords:1,records:[{natprofilename: MASQ ,manage natprofileid : 1 ,isdefault :y}]} ... Affected Version(s): [+] Cyberoam UTM Appliance CR300i, CR500i v10 & older versions Pictures: ../1.png ../2.png ../3.png ../4.png ../5.png ../sql_1.png ../sql_2.png ../os_exec.png Proof of Concept (PoC): ======================= The vulnerability can be exploited by remote attackers with auth. For demonstration or reproduce ... p0c