arXiv:2610.12893cs.CROct 2026

Manuscript Offprint

arXiv:2610.12893

Vulnerable Models in the AI Supply Chain: An Empirical Study of Adoption, Propagation, and Usage Patterns

The Anh Nguyen, Triet Huynh Minh Le, M. Ali Babar

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

The Anh Nguyen*, Triet Huynh Minh Le*, M. Ali Babar*†

*School of Computer Science and Information Technology, Adelaide University, Adelaide, Australia

{theanh.nguyen, triet.h.le, ali.babar}@adelaide.edu.au

†ElevexAI Systems

Abstract—The rapid integration of Artificial Intelligence (AI) models has established a complex supply chain, but many of these shared artifacts harbor severe vulnerabilities such as insecure serialization and architectural backdoors. While prior efforts have extensively scanned model registries to flag malicious artifacts, a critical gap remains in understanding how developers actually adopt and integrate these unsafe models into downstream software systems. We bridge this gap by conducting a large-scale empirical study on the usage and propagation of 16,977 known vulnerable models on HuggingFace flagged by InsightDB. We track their prevalence across GitHub repositories, software packages, fine-tuning chains, and deployed applications. Our analysis reveals that, despite being publicly flagged, these vulnerable models appear in over 21,000 code locations across more than 5,000 open-source repositories, with 3,757 distinct flagged models (22.1%) actively referenced in at least one project. To understand how these models are integrated in code and identify recurring usage patterns, we categorize and analyze the recurring patterns surrounding them via a customized pipeline that combines Code Property Graphs extraction with a tailored Frequent Subgraph Mining approach. Across all patterns, we find no evidence of provenance verification or model sanitization logic, with developers frequently bypassing security parameters or delegating trust to permissive framework defaults. These findings underscore that scanning model files alone is insufficient, highlighting the urgent need for context-aware security analysis and stricter integration guardrails at the application layer of the AI supply chain.

1. Introduction

The proliferation of Artificial Intelligence (AI) models has given rise to a complex, multi-layered AI supply chain. Central to this ecosystem are model registries, e.g., Hugging Face, which host millions of pre-trained models that developers can easily download and integrate into open-source frameworks, enterprise tools, and user-facing applications. This widespread reuse accelerates innovation but introduces broad exposure surfaces where the security of a downstream application is highly dependent on the integrity of its upstream AI components [1], [2], [3]. This reliance on third-party artifacts introduces significant security risks. Many pre-trained models are vulnerable to threats such as arbitrary code execution via insecure serialization formats (e.g., Python's pickle) or embedded architectural backdoors. While hosting platforms and security advisories have begun employing scanners to flag these vulnerable artifacts [4], [5], [6], the actual downstream impact of these vulnerabilities depends on whether and how developers consume the vulnerable models in their own codebases [7]. For instance, a model flagged for insecure deserialization poses little practical risk if never loaded, but becomes a concrete threat when a developer passes it directly to a loading API with permissive security settings, a scenario we find to be common in practice (Section 5.2).

Current research on AI supply chain security has primarily focused on identifying vulnerabilities within model files themselves [8], [9], [10] or quantifying their presence on model hosting platforms [6], [11]. While these analyses are essential for threat detection, they offer limited insights into the practical realities of downstream integration [7]. Specifically, it remains largely unknown to what extent developers adopt vulnerable models, how these models propagate through the broader software ecosystem, and what recurring coding patterns are used to integrate them. This gap hinders the development of effective, context-aware mitigation for the application layer of the AI supply chain.

We bridge this gap by extending the analytical focus beyond scanning only model artifacts to include developer usage. We conduct a comprehensive empirical investigation of the adoption, propagation, and integration patterns of 16,977 known vulnerable models on Hugging Face (HF). First, we measure the exposure of these vulnerable models across four dimensions of the AI supply chain: direct source code references on GitHub (GH), software package distributions, upstream and downstream fine-tuning chains, and deployed HF Spaces. Second, to understand how these models are integrated in developers' source code, we design a pipeline that combines Code Property Graph (CPG) extraction with custom normalization and constrained Frequent Subgraph Mining (FSM) using the Top-K Graph (TKG) algorithm. This approach enables us to systematically discover and categorize the recurring structural motifs of vulnerable model usage. Our key contributions are as follows:

• We reveal the widespread adoption of vulnerable models, despite public security advisories, with over 21,000 code occurrences in more than 5,000 repositories, and further propagation through 419 fine-tuned derivatives, 185 software packages, and over 1,200 deployed applications.

• We introduce a data-driven approach that leverages FSM via the TKG algorithm to automatically surface recurring propagation structures and candidate sinks directly from code. This approach complements traditional manual CPG workflows by reducing the manual effort required for source-sink specification, providing an empirically grounded foundation for future vulnerability query design.

• We show that vulnerable model usages recur in a small number of patterns and organize them into four motifs: Direct Usage, Local Propagation, Method Propagation, and Condition-Guarded Propagation, deriving a compact taxonomy of vulnerable model integration structures.

• Crucially, we observe a systemic lack of model sanitization or cryptographic provenance verification across all extracted patterns, demonstrating that developers consistently delegate security to permissive framework defaults or explicitly bypass available safeguards during model integration. Our findings show that artifact-level model scanning, while useful, is insufficient on its own to secure the AI supply chain, as security risks persist and amplify through downstream code integrations. We provide empirical evidence and concrete structural insights that can inform the design of context-aware static analysis tools, stronger secure-by-default framework behaviors, and integration-layer guardrails to reduce the gap between artifact-level detection and application-level protection.

References (100)

Couldn't load all references. Reload the page to try again.