Detecting SQL injection attacks using query result size

Young Su Jang, Jin Young Choi

Research output: Contribution to journalArticlepeer-review

35 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


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

ASJC Scopus subject areas

  • Computer Science(all)
  • Law


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

Cite this