arXiv:2608.24269cs.SEAug 2026

Manuscript Offprint

arXiv:2608.24269

Towards LLM-Enhanced Android Taint Analysis

Nicholas Miazzo, Marco Alecci, Jordan Samhi, Jacques Klein, Eleonora Losiouk

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Nicholas Miazzo

University of Padova

Padova, Italy

nicholas.miazzo@math.unipd.it

Marco Alecci

University of Luxembourg

Luxembourg, Luxembourg

marco.alecci@uni.lu

Jordan Samhi

University of Luxembourg

Luxembourg, Luxembourg

jordan.samhi@uni.lu

Jacques Klein

University of Luxembourg

Luxembourg, Luxembourg

jacques.klein@uni.lu

Eleonora Losiouk

University of Padova

Padova, Italy

eleonora.losiouk@unipd.it

Abstract

Taint analysis is a fundamental technique for detecting sensitive data leaks in Android apps. However, traditional static tools, such as FlowDroid, still face well-known challenges due to the complexity of accurately modeling the Android framework. In this paper, we investigate whether off-the-shelf Large Language Models (LLMs) can effectively reason about taint flows in Android apps. Our preliminary approach relies on an agentic interaction strategy, enabling the LLM to iteratively explore code and reason about data flows.

We conduct an initial evaluation on the DROIDBENCH benchmark against FlowDroid, where our approach outperforms the baseline: Gemini-3 Flash achieves an F1-score of 0.96, compared to 0.55 for FlowDroid. In particular, we observe improvements in challenging categories such as inter-component communication (0.95 vs. 0.17), implicit flows (0.94 vs. 0.00), and reflection (1.00 vs. 0.50), where FlowDroid typically struggles. On a small set of real-world apps, the LLM-based approach also identifies additional potential data leaks not reported by FlowDroid. These preliminary findings suggest that LLM reasoning may effectively complement traditional static taint analysis, motivating future research on hybrid LLM-enhanced taint analysis pipelines.

1 Introduction

Taint analysis is a fundamental technique for detecting sensitive data leaks in Android applications (apps), enabling the identification of flows from privacy-critical sources (e.g., device identifiers, location data, credentials) to potentially unsafe sinks such as network interfaces or logs. Over the past decade, static analysis tools such as FlowDroid [5] have become widely adopted due to their ability to perform precise, context-, flow-, and lifecycle-aware analysis of Android apps. However, these approaches rely on carefully engineered models of the Android framework and struggle with well-known challenges, including reflection, dynamic code loading, intercomponent communication, and incomplete code [22, 29, 30, 38, 39]. In parallel, Large Language Models (LLMs) are increasingly being adopted across a wide range of software engineering tasks, including bug detection and fixing [6, 8, 14, 17], testing [7, 13, 21, 31], vulnerability detection [12, 27, 34, 36, 40], and other applications [1, 15, 23, 26, 35, 41]. Their ability to understand and reason over both natural and programming languages enables them to bridge gaps traditionally filled by domain-specific models and heuristics.

As LLM capabilities continue to advance, a key question arises: Can an off-the-shelf LLM, without task-specific training or handcrafted framework models, effectively reason about taint flows in Android apps? In this paper, we investigate this question through a preliminary study on the use of LLM-driven reasoning for Android taint analysis. Instead of constructing explicit models of the Android framework, we enable an LLM to iteratively explore decompiled apps and reason about potential data flows via a Model Context Protocol (MCP)-based toolchain. In this setting, the LLM acts as an analysis agent, dynamically navigating code and forming hypotheses about source-to-sink relationships. Our goal is not to propose a production-ready taint analyzer, but to assess whether agentic LLM reasoning can potentially complement traditional static taint analysis approaches. To this end, we conduct an initial evaluation on the DROIDBENCH benchmark and a small set of real-world apps, comparing against the state-of-the-art FlowDroid.

Our findings provide early evidence that LLM-based reasoning can identify taint flows, often achieving higher recall in scenarios involving complex behaviors (e.g., ICC, reflection, and implicit flows), while showing comparable performance in more standard cases. This indicates that LLMs are particularly useful when traditional modeling becomes difficult, but are not always necessary. Rather than applying LLMs indiscriminately, these findings point to a hybrid approach: traditional analyzers handle common cases efficiently, while LLMs could be selectively applied to harder scenarios. Such a design could improve overall effectiveness while also helping balance computational cost and scalability. As future work, we plan to explore this direction by designing more advanced hybrid analysis pipelines that integrate static analysis and LLM-based reasoning, as well as extending our evaluation to a larger set of real-world apps. Contributions. This paper makes the following contributions:

  • We explore a novel perspective on Android taint analysis, investigating whether LLM can effectively reason about taint flows in Android apps.

  • We design an LLM-driven taint analysis approach that combines decompiled code with MCP-enabled tool interaction.

  • We provide a preliminary empirical study showing that LLM-based reasoning can complement traditional analyzers such as FlowDroid, particularly in challenging scenarios, motivating further studies on hybrid taint analysis approaches combining static analysis and agentic LLM reasoning.

References (9)