BaxBench: Can LLMs Generate Correct and Secure Backends?

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Vero, Mark, Mündler, Niels, Chibotaru, Victor, Raychev, Veselin, Baader, Maximilian, Jovanović, Nikola, He, Jingxuan, Vechev, Martin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909628652060672
author Vero, Mark
Mündler, Niels
Chibotaru, Victor
Raychev, Veselin
Baader, Maximilian
Jovanović, Nikola
He, Jingxuan
Vechev, Martin
author_facet Vero, Mark
Mündler, Niels
Chibotaru, Victor
Raychev, Veselin
Baader, Maximilian
Jovanović, Nikola
He, Jingxuan
Vechev, Martin
contents Automatic program generation 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 62% on code correctness; (ii) on average, we could successfully execute security exploits on around 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_11844
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle BaxBench: Can LLMs Generate Correct and Secure Backends?
Vero, Mark
Mündler, Niels
Chibotaru, Victor
Raychev, Veselin
Baader, Maximilian
Jovanović, Nikola
He, Jingxuan
Vechev, Martin
Cryptography and Security
Artificial Intelligence
Machine Learning
Programming Languages
Automatic program generation 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 62% on code correctness; (ii) on average, we could successfully execute security exploits on around 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.
title BaxBench: Can LLMs Generate Correct and Secure Backends?
topic Cryptography and Security
Artificial Intelligence
Machine Learning
Programming Languages
url https://arxiv.org/abs/2502.11844