mlsanityData to 14 Oct 2026

Exploring Automated Vulnerability Identification in JavaScript Code Using Large Language Models

arXiv 2609.13816 ↗First posted 12 Sep 2026cs.CR cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

JavaScript powers approximately 98.8% of all websites, making vulnerabilities in its code a significant security risk, yet existing detection approaches such as Static Application Security Testing (SAST) tools often fail to identify many real-world vulnerabilities when applied to isolated code snippets. This paper presents an empirical study of Large Language Model (LLM)-based vulnerability identification for JavaScript programs, evaluating three LLM families (Gemini 1.5 Flash, GPT-4o Mini, DeepSeek-R1-Distill-Llama-8B) across multiple prompting strategies (zero-shot, chain-of-thought, few-shot) and fine-tuning approaches on a dataset of 1,125 JavaScript code snippets spanning five Common Weakness Enumeration (CWE) categories: Injection (CWE-74), OS Command Injection (CWE-78), Cross-Site Scripting (CWE-79), SQL Injection (CWE-89), and Uncontrolled Resource Consumption (CWE-400). Our experiments show that LLMs substantially outperform traditional SAST tools on snippet-level vulnerability identification, with a fine-tuned Gemini 1.5 Flash model achieving 60% detection accuracy compared to near-zero performance from rule-based analyzers. We find that fine-tuning improves accuracy from 29% to 60%, Chain-of-Thought prompting benefits reasoning-capable models such as GPT-4o Mini, few-shot prompting is effective for polymorphic vulnerabilities such as Cross-Site Scripting, and performance varies across vulnerability categories, reaching up to 84% accuracy for structured vulnerabilities such as SQL Injection. These 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 vulnerability types.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 8 of its 19 references that are in the map. First posted on arXiv 12 Sep 2026.

Builds on

8 of 19 references.

References · 8

  1. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  3. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
  4. 2024Chain-of-Thought Prompting of Large Language Models for Discovering and Fixing Software Vulnerabilitiescited by 31
  5. 2023How Far Have We Gone in Vulnerability Detection Using Large Language Modelscited by 27
  6. 2025Large Language Models For Text Classification: Case Study And Comprehensive Reviewcited by 12
  7. 2023Study of JavaScript Static Analysis Tools for Vulnerability Detection in Node.js Packagescited by 2
  8. 2024Boosting Cybersecurity Vulnerability Scanning based on LLM-supported Static Application Security Testingcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Large Language Models Cannot Reliably Detect Vulnerabilities in JavaScript: The First Systematic Benchmark and Evaluation
  2. 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Security
  3. 2025A Systematic Study of Code Obfuscation Against LLM-based Vulnerability Detection
  4. 2026An Empirical Evaluation of LLM-Based Approaches for Code Vulnerability Detection: RAG, SFT, and Dual-Agent Systems
  5. 2025A Systematic Study on Generating Web Vulnerability Proof-of-Concepts Using Large Language Models
  6. 2026An Empirical Evaluation of LLM-Generated Code Security Across Prompting Methods
  7. 2024Software Vulnerability and Functionality Assessment using LLMs
  8. 2025Explicit Vulnerability Generation with LLMs: An Investigation Beyond Adversarial Attacks