PHPJoy: A Novel Extended Graph-Based PHP Code Analysis Framework
Nowadays, the PHP language is widely used in web development. Owing to PHP’s inherent flexibility and dynamic language features (e.g., cross-module dependencies and runtime polymorphism), PHP applications are prone to various security vulnerabilities, such as XSS and SQL injection. As an effective PHP semantic understanding and security vetting technique, static program analysis has been widely applied. However, prior work faced difficulties in dealing with diverse and dynamic PHP features, which caused serious false negatives (e.g., call target missing). <p xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">In this paper, we propose a novel extended graph-based program analysis approach, called <monospace>PHPJoy</monospace>, that can effectively and universally learn the semantic landscape of the target PHP program and conduct security validations. Specifically, <monospace>PHPJoy</monospace> first performs fine-grained program analysis (i.e., cross-module analysis and field-level analysis) for the purpose of learning the extended semantic graphs. Then, based on the graph-based semantic information, <monospace>PHPJoy</monospace> universally models various security issues by efficiently utilizing a new security-oriented graph query framework, which provides rich and easy-to-use graph query APIs and a high-performance cache-and-prefetch strategy. <p xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">We evaluate <monospace>PHPJoy</monospace> on 333 popular PHP programs. The results show that <monospace>PHPJoy</monospace> can effectively discover 269,901,982 semantic graph edges, improving by 23.76% when compared to the existing analysis tools. Our further analysis also shows that the runtime analysis overhead is reduced by 76.54%. Furthermore, <monospace>PHPJoy</monospace> successfully hunts 53 zero-day security vulnerabilities in the wild, which verifies the practicality of <monospace>PHPJoy</monospace>.
Authors
- Yuan Zhang (ORCID: https://orcid.org/0000-0003-0726-9996)
- Guangliang Yang (ORCID: https://orcid.org/0000-0001-7066-0109)
- Min Yang (ORCID: https://orcid.org/0000-0001-9714-5545)
- Youkun Shi (ORCID: https://orcid.org/0009-0004-0763-4732)
- Shengke Ye
- Xiapu Luo (ORCID: https://orcid.org/0000-0002-9082-3208)
- Fengyu Liu (ORCID: https://orcid.org/0009-0009-4680-6513)
- Chengyu Yang
- Tianhan Luo
Institutions
- Hong Kong Polytechnic University (HK)
- Fudan University (CN)
Publication Details
- Journal
- IEEE Transactions on Software Engineering
- Published
- 2025-09-26
- DOI
- https://doi.org/10.1109/tse.2025.3614304
- Primary Topic
- Service-Oriented Architecture and Web Services
- Type
- article
- Field-Weighted Citation Impact
- 0.00