Detecting SQL injection attacks using query result size

Young Su Jang, Jin Young Choi

Research output: Contribution to journalArticlepeer-review

38 Citations (Scopus)


Web applications are becoming an essential part of our everyday lives, with many of our activities dependent on the functionality and security of these applications. Web applications are ubiquitous, perform mission critical tasks, and handle sensitive user data. As the scale of these applications grows, injection vulnerabilities, such as SQL injections, become major security challenges. Most of these vulnerabilities stem from a lack of input validation; that is, web applications use malicious input as part of a sensitive operation without properly checking or sanitizing the input values. SQL injection attacks target databases that are accessible through a web front-end; moreover, they take advantage of flaws in the input validation logic of web components. In this paper, we exhibit a novel scheme that automatically transforms web applications, rendering them safe against SQL injection attacks. Our technique dynamically analyzes the developer-intended query result size for any input, and detects attacks by comparing this against the result of the actual query. We implement this technique in a tool for protecting Java-based web applications. An experimental evaluation demonstrates that our technique is effective against SQL injection vulnerabilities.

Original languageEnglish
Pages (from-to)104-118
Number of pages15
JournalComputers and Security
Publication statusPublished - 2014 Jul

Bibliographical note

Funding Information:
This research was supported by the MSIP (Ministry of Science, ICT and Future Planning), Korea , under the ITRC (Information Technology Research Center) support program ( NIPA-2014-H0301-14-1023 ) supervised by the NIPA (National IT Industry Promotion Agency) .


  • Input validation
  • Query result size
  • SQL injection
  • Sanitization
  • Sensitive operation
  • Web applications

ASJC Scopus subject areas

  • General Computer Science
  • Law


Dive into the research topics of 'Detecting SQL injection attacks using query result size'. Together they form a unique fingerprint.

Cite this