We characterize two new classes of semantic vulnerabilities
in Web applications and present SAFERPHP, a static analysis framework for discovering them in PHP source code.
SAFERPHP employs several new algorithms, including (i)
a new type of symbolic execution to find denial-of-service
vulnerabilities due to attacker-controlled infinite loops, and
(ii) a new type of whole-program, inter-procedural analysis
to infer the application’s authorization policy and find missing checks prior to sensitive database operations. Ancillary
benefits of SAFERPHP include the ability to find vulnerable
calls to built-in PHP functions, misuses of uninitialized variables, and SQL injection vulnerabilities. When evaluated on
several open-source PHP applications, SAFERPHP discovered multiple previously unreported, remotely exploitable
security vulnerabilities.