NTH

Last Secure Code Benchmark: Is the Code You Vibe Secure?

AuthorsTianyi Wu, Chao Ge, Peng Chen, Fengji Zhang, Yongxing Wu, Yuchong Xie, Jian Li, Chaoyuan Peng, Kaikai Zhang, Dong Huang, Mingzhe Du, Yukai Huang, Jiaheng Zhang, Terry Yue Zhuo, See-Kiong Ng

AffiliationsNational University of Singapore · Qwen Team, Alibaba Token Hub, Alibaba Group†Corresponding author. GitHub Leaderboard Harbor Hub · Cloud Safety and Security, Alibaba Cloud, Alibaba Group

October 23, 2026 2 min read
Watch on YouTube
The one-line take

A new benchmark finds that coding agents often produce functional code that still fails to protect against real vulnerabilities.

Key results

450
LSCBench tasks

Tasks derived from 150 real vulnerabilities, each tested at three code-generation scopes.

25.1%
Best task-level functional-and-secure pass rate

Claude Fable 5’s share of tasks passing both hidden functional and security tests.

12%
Best all-scopes scenario pass rate

Claude Fable 5’s share of scenarios secured at function, file, and repository scope.

What the paper found

The Last Secure Code Benchmark, or LSCBench, tests whether coding agents produce code that is both functional and secure when users specify behavior but say nothing about security. It includes 450 tasks built from 150 real vulnerabilities, across seven languages and 24 CWE categories, with each vulnerability tested at function, file, and repository scope using hidden functional and attack-based security tests. Across six agents—including Anthropic’s Claude Fable 5, OpenAI’s GPT-5.6-Sol, Alibaba’s Qwen3.8-Max, DeepSeek-V4-Pro, GLM-5.3, and Kimi-K3—functional pass rates are generally high, but Claude Fable 5, the strongest on joint success, passes both test suites on only 25.1% of tasks and secures all three scopes for just 12% of scenarios. The analysis finds that agents more often include local safeguards, such as bounds checks, than infer unstated deployment policies governing access, data exposure, or permitted destinations; more reasoning turns alone do not reliably close that gap. A one-sentence security reminder substantially improves joint success for several agents, but does not eliminate the vulnerability problem. LSCBench’s central contribution is to measure secure code generation under realistic, security-neutral “vibe coding” requests rather than treating functional correctness as evidence of safe software.

Original abstract

AI coding agents now write much of the code that ships, yet whether that code is secure remains unclear. We introduce the Last Secure Code Benchmark, a comprehensive evaluation of secure code generation by coding agents. Built from 150 real vulnerabilities, its 450 tasks span seven widely used languages (Java, C, C++, JavaScript, Python, PHP, and Go), 24 CWEs including 21 of the 2025 CWE Top 25 and 8 of the Top 10 KEV weaknesses, more than any benchmark we compare with, and three vibe-coding scenarios: filling in a function, writing a file, and building a repository's source tree from scratch. Every task asks only for functionality, through a specification that never mentions security, and hidden functional and security tests grade the result. Across six frontier agents, 73.6% to 91.3% of tasks pass functionally, yet even the strongest, Claude Fable 5, produces code that is both functional and secure for only 25.1% of tasks, and the others for 16.4% to 24.7%. The best model only passes 12% of the vulnerability scenarios across all vibe coding setting, posing strong concern on the security of the code written by vibe coding.

Read the original paper

More in AI Benchmarks

Browse all 51 papers →
01Benchmark

HandsOn: A Large-Scale Simulation Benchmark for Generalizable Dexterous Manipulation

Tianwei Luo, Yiming He, Hongjin Wu, Ting Pan, Debin Ren, Haorui Guo, Junlin Yang, Yuxin Zuo, Zhehao Kou, Kaisen Yang, Zhuoqun Lai, Yi Ding, Jiale Yu, Yuchen Zhang, Zijie Qiu, Haozhan Li, Ning Ding

HandsOn is a large benchmark for testing whether dexterous robots can generalize manipulation skills across hands, objects, and tasks.

Read analysis
03Benchmark

FrontierCS 2: A Benchmark for Computer Science R&D

Qiuyang Mang, Wenhao Chai, Runyuan He, Dongruixuan Li, Zihan Zheng, Yujun He, Xuanyi Zhou, Hao Wang, Siddhant Ray, Bo Peng, Ruyi Ji, Shuo Yang, Haocheng Xi, Boru Chen, Xinyang David Han, Melissa Pan, Mayank Mishra, Boxi Yu, Sijia Liu, Kerem Akillioglu, Yi Pan, Zirui Wang, Mert Cemri, Diogo Antunes, Yichuan Wang, Aiwei Ivy Zhang, Zhenyang Chen, Qizheng Zhang, Kaiyuan Liu, Wenyuan Huang, Sherry Ruan, Shu Liu, Dacheng Li, Zerui Cheng, Zeyu Shen, Shang Zhou, Hanfei Chen, Yuzhong Zhang, Bohan Lyu, Qu Ao, Han Zheng, Chonghe Jiang, Jingzhuo Hu, Xiaokun Chen, Kunjun Li, Zhiqing Zhong, Haoye Tian, Tong Zhao, Yunzhong He, Hanchen Li, Ofir Press, Jiantao Jiao, Kunle Olukotun, Karthik R. Narasimhan, Jingbo Shang, Koushik Sen, Matei Zaharia, Alex Dimakis, Ion Stoica, Joseph E. Gonzalez, Alvin Cheung

FrontierCS 2 tests whether AI agents can improve real research codebases across a wide range of computer science tasks.

Read analysis