Web applications are vulnerable to semantic attacks such as
denial of service due to infinite loops caused by malicious
inputs and unauthorized database operations due to missing
security checks. Unlike “conventional” threats such as SQL
injection and cross-site scripting, these attacks exploit bugs
in the logic of the vulnerable application and cannot be
discovered using data-flow analysis alone.
We give the first characterization of these types of vulnerabilities in PHP applications, develop novel inter-procedural
algorithms for discovering them in PHP source code, and
implement these algorithms as part of SAFERPHP, a framework for static security analysis of PHP applications. SAFERPHP uncovered multiple, previously unreported vulnerabilities in several popular Web applications