Attackers can inject malicious SQL statements in order to access or modify data, or as a pivot to access a different system via SQL injection.

System administrators need to be aware of the risk of SQL injection in applications, and have a strategy in place for detecting and blocking such attacks. The best prevention is to have an application security assessment and penetration test before releasing an application or upgrading the software.

What’s the risk? SQL injection occurs when user input is used in a SQL query, typically resulting in information disclosure or data corruption.

What to do? Always validate user input before using it in a SQL query.

For more information on preventing SQL injection, see Codenomicon’s post on the topic. CodeIgniter =3.1.13 is vulnerable to Cross-site scripting (XSS) via system\database\DB_query_builder.php or_where() function.

An attacker can inject malicious code into the system via user input in the or_where() function.

In addition, XSS is also frequently used in phishing attacks, so caution needs to be taken when clicking on links that are received via email.

What’s the risk? XSS occurs when user input is used in a website’s code directly, typically resulting in information disclosure or data corruption.

What to do? Always validate user input before using it in a website’s code.

SQL Injection - An Introduction

SQL injection is a security vulnerability that occurs when user input is used in a SQL query. It occurs when the application's code is not sanitized before it is inserted into the database, and consequently allows attackers to execute arbitrary SQL queries by exploiting this flaw.

Although the term "SQL injection" can be used to describe many different types of vulnerabilities, it typically refers to an attack where attackers inject malicious code into the application's database via user input in an SQL query. The most common way for attackers to exploit this type of vulnerability is by using a technique known as SQL Injection.

The term "SQL injection" has been adopted by various security researchers who have documented various methods and tools that can be used to perform these attacks. For example, members of the XSS-Labs research team coined the term in 2003 after determining that different variants of cross-site scripting could also be exploited via SQL injection.

Affected applications include those which receive or process user input containing special characters, such as certain quotation marks or angle brackets; other common examples include user name and password fields in web forms and databases, email addresses in URLs or HTML links, or file names and file extensions (such as .php). Learning how to identify vulnerable applications can be difficult because they often cannot be easily identified without examining their source code.

Timeline

Published on: 10/07/2022 11:15:00 UTC
Last modified on: 10/08/2022 01:36:00 UTC

References