LLMs in Web Development: Evaluating LLM-Generated PHP Code Unveiling Vulnerabilities and Limitations
Not on the map. Why?
Abstract (arXiv)
This study evaluates the security of web application code generated by Large Language Models, analyzing 2,500 GPT-4 generated PHP websites. These were deployed in Docker containers and tested for vulnerabilities using a hybrid approach of Burp Suite active scanning, static analysis, and manual review. Our investigation focuses on identifying Insecure File Upload, SQL Injection, Stored XSS, and Reflected XSS in GPT-4 generated PHP code. This analysis highlights potential security risks and the implications of deploying such code in real-world scenarios. Overall, our analysis found 2,440 vulnerable parameters. According to Burp's Scan, 11.56% of the sites can be straight out compromised. Adding static scan results, 26% had at least one vulnerability that can be exploited through web interaction. Certain coding scenarios, like file upload functionality, are insecure 78% of the time, underscoring significant risks to software safety and security. To support further research, we have made the source codes and a detailed vulnerability record for each sample publicly available. This study emphasizes the crucial need for thorough testing and evaluation if generative AI technologies are used in software development.
Key facts. Cited by 22 papers in the map (data through 14 Oct 2026). Builds on 16 of its 32 references that are in the map. First posted on arXiv 21 Apr 2024.
Builds on
16 of 32 references.
References · 16
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2023Self-collaboration Code Generation via ChatGPTcited by 258
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 102
- 2023The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Developmentcited by 96
- 2023A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verificationcited by 42
- 2023The FormAI Dataset: Generative AI in Software Security Through the Lens of Formal Verificationcited by 34
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
4 more
- 2023A/B Testing: A Systematic Literature Reviewcited by 16
- 2024All Artificial, Less Intelligence: GenAI through the Lens of Formal Verificationcited by 11
- 2023Learning Defect Prediction from Unrealistic Datacited by 5
- 2023NoCodeGPT: A No-Code Interface for Building Web Apps with Language Modelscited by 4
Built on by
Citing papers per year: 2024: 6; 2025: 13; 2026: 3.
22 papers.
Sort:
By area:
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 86
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 42
- 2025Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineeringcited by 15
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?cited by 10
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 10
- 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detectioncited by 10
- 2025Vulnerability Detection: From Formal Verification to Large Language Models and Hybrid Approaches: A Comprehensive Overviewcited by 7
- 2025The Hidden Risks of LLM-Generated Web Application Code: A Security-Centric Evaluation of Code Generation Capabilities in Large Language Modelscited by 7
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
- 2025How Safe Are AI-Generated Patches? A Large-scale Study on Security Risks in LLM and Agentic Automated Program Repair on SWE-benchcited by 5
- 2025Automated Consistency Analysis of LLMscited by 4
10 more
- 2025Curiosity by Design: An LLM-based Coding Assistant Asking Clarification Questionscited by 4
- 2024TaskEval: Assessing Difficulty of Code Generation Tasks for Large Language Modelscited by 3
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detectioncited by 3
- 2024Automatic Detection of LLM-Generated Code: A Comparative Case Study of Contemporary Models Across Function and Class Granularitiescited by 1
- 2025Generative AI for Internet of Things Security: Challenges and Opportunitiescited by 1
- 2025How Good LLM-Generated Password Policies Are?cited by 0
- 2025CrossPL: Evaluating Large Language Models on Cross Programming Language Code Generationcited by 0
- 2026Evaluating the Use of LLMs for Automated DOM-Level Resolution of Web Performance Issuescited by 0
- 2026Assessing Spear-Phishing Website Generation in Large Language Model Coding Agentscited by 0
- 2026Security in LLM-Assisted Coding: A Systematic Literature Reviewcited by 0
- 2026Security in LLM-Assisted Coding: A Systematic Literature Review11 Oct 2026
- 2026Assessing Spear-Phishing Website Generation in Large Language Model Coding Agents13 Feb 2026
- 2026Evaluating the Use of LLMs for Automated DOM-Level Resolution of Web Performance Issues9 Jan 2026
- 2025Curiosity by Design: An LLM-based Coding Assistant Asking Clarification Questions28 Jul 2025
- 2025CrossPL: Evaluating Large Language Models on Cross Programming Language Code Generation26 Jul 2025
- 2025How Safe Are AI-Generated Patches? A Large-scale Study on Security Risks in LLM and Agentic Automated Program Repair on SWE-bench30 Jun 2025
- 2025How Good LLM-Generated Password Policies Are?10 Jun 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AI26 May 2025
- 2025The Hidden Risks of LLM-Generated Web Application Code: A Security-Centric Evaluation of Code Generation Capabilities in Large Language Models29 Apr 2025
- 2025Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineering7 Apr 2025
- 2025Vulnerability Detection: From Formal Verification to Large Language Models and Hybrid Approaches: A Comprehensive Overview13 Mar 2025
10 more
- 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detection12 Mar 2025
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detection10 Mar 2025
- 2025Generative AI for Internet of Things Security: Challenges and Opportunities13 Feb 2025
- 2025Automated Consistency Analysis of LLMs10 Feb 2025
- 2024The Impact of Prompt Programming on Function-Level Code Generation29 Dec 2024
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Security19 Dec 2024
- 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?3 Nov 2024
- 2024Automatic Detection of LLM-Generated Code: A Comparative Case Study of Contemporary Models Across Function and Class Granularities2 Sep 2024
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Future5 Aug 2024
- 2024TaskEval: Assessing Difficulty of Code Generation Tasks for Large Language Models30 Jul 2024
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 86
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AIcited by 42
- 2025How Safe Are AI-Generated Patches? A Large-scale Study on Security Risks in LLM and Agentic Automated Program Repair on SWE-benchcited by 5
- 2026Assessing Spear-Phishing Website Generation in Large Language Model Coding Agentscited by 0
- 2026Assessing Spear-Phishing Website Generation in Large Language Model Coding Agents13 Feb 2026
- 2025How Safe Are AI-Generated Patches? A Large-scale Study on Security Risks in LLM and Agentic Automated Program Repair on SWE-bench30 Jun 2025
- 2025Vibe Coding vs. Agentic Coding: Fundamentals and Practical Implications of Agentic AI26 May 2025
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Future5 Aug 2024
- 2025Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineeringcited by 15
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?cited by 10
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 10
- 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detectioncited by 10
- 2025Vulnerability Detection: From Formal Verification to Large Language Models and Hybrid Approaches: A Comprehensive Overviewcited by 7
- 2025The Hidden Risks of LLM-Generated Web Application Code: A Security-Centric Evaluation of Code Generation Capabilities in Large Language Modelscited by 7
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
- 2025Automated Consistency Analysis of LLMscited by 4
- 2025Curiosity by Design: An LLM-based Coding Assistant Asking Clarification Questionscited by 4
- 2024TaskEval: Assessing Difficulty of Code Generation Tasks for Large Language Modelscited by 3
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detectioncited by 3
12 most cited of 18 All 18 (JSON)
- 2026Security in LLM-Assisted Coding: A Systematic Literature Review11 Oct 2026
- 2026Evaluating the Use of LLMs for Automated DOM-Level Resolution of Web Performance Issues9 Jan 2026
- 2025Curiosity by Design: An LLM-based Coding Assistant Asking Clarification Questions28 Jul 2025
- 2025CrossPL: Evaluating Large Language Models on Cross Programming Language Code Generation26 Jul 2025
- 2025How Good LLM-Generated Password Policies Are?10 Jun 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025
- 2025The Hidden Risks of LLM-Generated Web Application Code: A Security-Centric Evaluation of Code Generation Capabilities in Large Language Models29 Apr 2025
- 2025Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineering7 Apr 2025
- 2025Vulnerability Detection: From Formal Verification to Large Language Models and Hybrid Approaches: A Comprehensive Overview13 Mar 2025
- 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detection12 Mar 2025
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detection10 Mar 2025
- 2025Generative AI for Internet of Things Security: Challenges and Opportunities13 Feb 2025
12 newest of 18 All 18 (JSON)