A security assessment on 75 FastAPI backends generated by three contemporary LLMs revealed a disconnect between functional correctness and secure logic, which is interpreted as a review-risk pattern, which is called the human-in-the-loop paradox.
Abstract
The adoption of Large Language Models (LLMs) is changing how code is written, but the security implications of using LLMs to generate complete web API backends remain insufficiently characterized. Prior studies have assessed the security of LLM-generated code by detecting vulnerabilities in isolated code snippets; however, these assessments are too narrow to surface vulnerabilities that emerge in multi-endpoint backend services. To address this gap, we performed a security assessment on 75 FastAPI backends generated by three contemporary LLMs (Gemini 2.5 Pro, GPT 5.2, and DeepSeek V3.2). We designed a benchmark comprising the following five code generation categories: Authentication, Role-Based Access Control, File Uploads, Payment Processing, and Webhook Handling. Automated analysis of the generated APIs with Static Application Security Testing (SAST) tools, whose raw alerts we manually triaged to remove false positives, mainly revealed configuration problems, while Dynamic Application Security Testing (DAST) tools helped uncover runtime fragility such as application crashes on malformed input. Automated analysis was augmented with a manual assessment phase, which revealed vulnerabilities such as mass assignment and server-side request forgery. We also observed a disconnect between functional correctness and secure logic. In our trials, DeepSeek V3.2 produced the most vulnerable code despite the highest build success rate. Gemini 2.5 Pro had the highest startup-failure rate and produced shorter implementations, which coincided with fewer observed runtime findings among the APIs that started. GPT-5.2 fell between the two, characterized by near-correct security controls that took the right form but lacked the intended effect. We interpret this disconnect as a review-risk pattern, which we call the human-in-the-loop paradox: syntactically correct and well-structured LLM-generated code can still contain architectural vulnerabilities that are not revealed by surface-level inspection. The takeaway is that LLM-generated code warrants the same treatment as untrusted input from an external system.
Results indicate that LLMs provide a practical approach for automated vulnerability identification in JavaScript code, particularly when combined with task-aligned supervision, though they should complement rather than replace existing security analysis workflows due to limited recall and uneven performance across vuln...
Manit Kaushik, Ishir Bhardwaj, Pranav Gupta et al.· 0 citations
Rust has emerged as the leading system programming language, offering strong memory and type safety guarantees without compromising performance. This positions it as a compelling alternative to traditional languages like C and C++, which are susceptible to memory security bugs. However, manually transforming C to Rust...
The increasing integration of large language models (LLMs) into systems introduces new attack surfaces that extend beyond traditional software vulnerabilities. While LLMs are commonly protected by prompt-level security mechanisms, recent researches show that these controls can be bypassed through carefully crafted inpu...
Tamás Girászi, Natália Papp, Norbert Oláh et al.· Proceedings of the 13th Inte...· 0 citations
Differential fuzzing reveals complementary bugs in the manual and LLM porting of security-critical C libraries to idiomatic Rust and translates these findings into concrete practical guidance for teams planning a similar migration.
Marco Parrillo, Marco Grassi, Luigi Laura· Future Internet· 0 citations
RTL-Obliger is presented, a neuro-symbolic framework that infers implicit security obligations of register-transfer-level RTL in a functionality-preserving two-stage generation and raises mean all-pass rates.
Guang Yang, Xing Hu, Xiang Chen et al.· 0 citations
Advances in large language models (LLMs) have enabled AI-driven code generation from natural language specifications, introducing new attack surfaces for injecting vulnerabilities into software. Prior work has studied this problem only in benign settings where vulnerabilities are introduced inadvertently, or under unco...
Zeezoo Ryu, S. Chung, M. F. Karim et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.