The essence of command injection attacks in web applications
Abstract
Web applications typically interact with a back-end database to retrieve persistent data and then present the data to the user as dynamically generated output, such as HTML web pages. However, this interaction is commonly done through a low-level API by dynamically constructing query strings within a general-purpose programming language, such as Java. This low-level interaction is ad hoc because it does not take into account the structure of the output language. Accordingly, user inputs are treated as isolated lexical entities which, if not properly sanitized, can cause the web application to generate unintended output. This is called a command injection attack, which poses a serious threat to web application security. This paper presents the first formal definition of command injection attacks in the context of web applications, and gives a sound and complete algorithm for preventing them based on context-free grammars and compiler parsing techniques. Our key observation is that, for an attack to succeed, the input that gets propagated into the database query or the output document must change the intended syntactic structure of the query or document. Our definition and algorithm are general and apply to many forms of command injection attacks. We validate our approach with SqlCheckS, an implementation for the setting of SQL command injection attacks. We evaluated SqlCheckS on real-world web applications with systematically compiled real-world attack data as input. SqlCheckS…
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The solution to security challenges in computing has been to create clear notions of privilege, and attacks such as SQL injections and command injections are solved by not treating user inputs as privileged instructions.
“The solution to these challenges in computing has been to create clear notions of privilege, e.g., operating systems use a hierarchy of access and control (Corbat ó & Vyssotsky, 1965;Ritchie & Thompson, 1974) and attacks such as SQL injections (Su & Wassermann, 2006) and command injections (Zhong et al., 2024) are solved by not treating user inputs as privileged instructions (Thomas et al., 2009).”
From The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions (2024) · cites this paper as Su & Wassermann, 2006
Cited by
Sorted by citations
Le Goues, C., Pradel, M., & Roychoudhury, A. (2019) · Communications of the ACM · doi:10.1145/3318162 · Cited by 410 · see citing works
The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions
Wallace, E., Xiao, K., Leike, R., Weng, L., Heidecke, J., & Beutel, A. (2024) · arXiv · doi:10.48550/arxiv.2404.13208 · Cited by 14 · see citing works
“…operating systems use a hierarchy of access and control (Corbat´o & Vyssotsky, 1965; Ritchie & Thompson, 1974) and attacks such as SQL injections (Su & Wassermann, 2006) and command injections (Zhong et al., 2024) are solved by not treating user inputs as privileged instructions (Thomas et al.,…”
Background
- Authors
- Su, Z., & Wassermann, G.
- Affiliations
- University of California, Davis (US)
- ORCID
- Su, Zhendong
- Venue
- Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
- Publisher
- ACM
- Published
- 2006-01-11
- Pages
- 372-382
- OpenAlex
- W2144696387
- Cited by
- 515
- References
- 0
- Citations by year
- 2026: 2 · 2025: 5 · 2024: 6 · 2023: 4 · 2022: 7 · 2021: 14 · 2020: 19 · 2019: 16 · 2018: 17 · 2017: 35 · 2016: 39 · 2015: 32 · 2014: 39 · 2013: 33 · 2012: 54
- FWCI
- 28.15
- Type
- conference paper
- Language
- en
- Open access
- closed
- Locations
- ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) (publishedVersion)
- Topics
- Physical Sciences › Computer Science › Information Systems › Web Application Security Vulnerabilities
- Physical Sciences › Computer Science › Artificial Intelligence › Security and Verification in Computing
- Physical Sciences › Computer Science › Information Systems › Web Applications and Data Management
- Keywords
- web application security, SQL injection, context-free grammars, input sanitization
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review