Lune

ICML2025Top-tier venue

BaxBench: Can LLMs Generate Correct and Secure Backends?

Mark Vero, Niels Mündler, Victor Chibotaru, Veselin Raychev, Maximilian Baader, Nikola Jovanovic, Jingxuan He, Martin T. Vechev

Abstract

The automatic generation of programs has long been a fundamental challenge in computer science. Recent benchmarks have shown that large language models (LLMs) can effectively generate code at the function level, make code edits, and solve algorithmic coding tasks. However, to achieve full automation, LLMs should be able to generate production-quality, self-contained application modules. To evaluate the capabilities of LLMs in solving this challenge, we introduce BAXBENCH, a novel evaluation benchmark consisting of 392 tasks for the generation of backend applications. We focus on backends for three critical reasons: (i) they are practically relevant, building the core components of most modern web and cloud software, (ii) they are difficult to get right, requiring multiple functions and files to achieve the desired functionality, and (iii) they are security-critical, as they are exposed to untrusted third-parties, making secure solutions that prevent deployment-time attacks an imperative. BAXBENCH validates the functionality of the generated applications with comprehensive test cases, and assesses their security exposure by executing end-to-end exploits. Our experiments reveal key limitations of current LLMs in both functionality and security: (i) even the best model, OpenAI o1, achieves a mere 60% on code correctness; (ii) on average, we could successfully execute security exploits on more than half of the correct programs generated by each LLM; and (iii) in less popular backend frameworks, models further struggle to generate correct and secure applications. Progress on BAXBENCH signifies important steps towards autonomous and secure software development with LLMs 1 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents cites RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems
  • Constrained Decoding of Diffusion LLMs with Context-Free Grammars cites SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  • Constrained Decoding of Diffusion LLMs with Context-Free Grammars cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks cites SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  • Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks cites Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions
  • Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarios cites SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  • SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarios cites Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions
  • SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarios cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarios cites Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks
  • Insecure Coding Preferences in Long-Term Memory: Security Risks for LLM-Based Code Generation cites Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World TasksSongwen Zhao, Danqing Wang, Kexun Zhang, Jiaxuan Luo et al.ICML 2026 · 22 citations
  2. Constrained Decoding of Diffusion LLMs with Context-Free GrammarsNiels Mündler, Jasper Dekoninck, Martin VechevICLR 2026 · 18 citations
  3. SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing ScenariosJunkai Chen, Huihui Huang, Yunbo Lyu, Junwen An et al.ACL 2026 · 5 citations
  4. Insecure Coding Preferences in Long-Term Memory: Security Risks for LLM-Based Code GenerationYuchen Chen, Wei Cheng, Yuan Xiao, Zhou Yang et al.ISSTA 2026

Builds on11

  1. SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao et al.ICLR 2024 · 2,082 citations
  2. Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code ContributionsHammond Pearce, Baleegh Ahmad, Benjamin Tan, Brendan Dolan-Gavitt et al.S&P 2022 · 725 citations
  3. DS-1000: A Natural and Reliable Benchmark for Data Science Code GenerationYuhang Lai, Chengxi Li, Yiming Wang, Tianyi Zhang et al.ICML 2023 · 504 citations
  4. RepoBench: Benchmarking Repository-Level Code Auto-Completion SystemsTianyang Liu, Canwen Xu, Julian J. McAuleyICLR 2024 · 338 citations
  5. SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code AgentsNiels Mündler, Mark Niklas Müller, Jingxuan He, Martin T. VechevNeurIPS 2024 · 172 citations

Related papers

  1. AutoBaxBuilder: Bootstrapping Code Security BenchmarkingTobias von Arx, Niels Mündler, Mark Vero, Maximilian Baader et al.ICML 2026 · 1 citation
  2. ABC-Bench: Benchmarking Agentic Backend Coding in Real-World DevelopmentJie Yang, Honglin Guo, Li Ji, Jiazheng Zhou et al.ACL Findings 2026
  3. AutoCodeBench: Large Language Models are Automatic Code Benchmark GeneratorsChangzhi Zhou, Ao Liu, Yuchi Deng, Zhiying Zeng et al.ICLR 2026 · 27 citations
  4. SEC-bench: Automated Benchmarking of LLM Agents on Real-World Software Security TasksHwiwon Lee, Ziqi Zhang, Hanxiao Lu, Lingming ZhangNeurIPS 2025 · 86 citations
  5. AutoSUIT Bench - Automated Security UnIt Test Benchmark for LLM CodingSamuel Osebe, Fan Yang, Junyi Li, Yue Gu et al.ACL Findings 2026
Dusk over the sea between two cliffs drawn in fine vertical lines