Why LLMs Fail: A Failure Analysis and Partial Success Measurement for Automated Security Patch Generation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: Al-Maamari, Amir
Format: Preprint
Veröffentlicht: 2026
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910048449462272
author Al-Maamari, Amir
author_facet Al-Maamari, Amir
contents Large Language Models (LLMs) show promise for Automated Program Repair (APR), yet their effectiveness on security vulnerabilities remains poorly characterized. This study analyzes 319 LLM-generated security patchesacross 64 Java vulnerabilities from the Vul4J benchmark. Using tri-axis evaluation (compilation, security via PoV tests, functionality via test suites), the analysis reveals that only 24.8% of patches achieve full correctness, while 51.4% fail both security and functionality. The dominant failure mode is semantic misunderstanding: LLMs produce syntactically valid code but apply incorrect repair strategies. The proposed Security Repair Score (SRS) quantifies this gap, showing LLMs preserve functionality (mean 0.832) but struggle with security (mean 0.251). Vulnerability type strongly predicts difficulty, with fix rates ranging from 0% (input validation) to 45% (infinite loop). These findings demonstrate that LLM security patches require rigorous validation before deployment.
format Preprint
id arxiv_https___arxiv_org_abs_2603_10072
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Why LLMs Fail: A Failure Analysis and Partial Success Measurement for Automated Security Patch Generation
Al-Maamari, Amir
Cryptography and Security
Artificial Intelligence
Large Language Models (LLMs) show promise for Automated Program Repair (APR), yet their effectiveness on security vulnerabilities remains poorly characterized. This study analyzes 319 LLM-generated security patchesacross 64 Java vulnerabilities from the Vul4J benchmark. Using tri-axis evaluation (compilation, security via PoV tests, functionality via test suites), the analysis reveals that only 24.8% of patches achieve full correctness, while 51.4% fail both security and functionality. The dominant failure mode is semantic misunderstanding: LLMs produce syntactically valid code but apply incorrect repair strategies. The proposed Security Repair Score (SRS) quantifies this gap, showing LLMs preserve functionality (mean 0.832) but struggle with security (mean 0.251). Vulnerability type strongly predicts difficulty, with fix rates ranging from 0% (input validation) to 45% (infinite loop). These findings demonstrate that LLM security patches require rigorous validation before deployment.
title Why LLMs Fail: A Failure Analysis and Partial Success Measurement for Automated Security Patch Generation
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2603.10072