Answers are grounded in this paper and cite their sources.
Cross-sectional analysis reveals rising exposures of API credentials in public healthcare LLM repositories, highlighting security risks in scientific code sharing.
The rapid adoption of large language models (LLMs) in healthcare research has created a new class of security vulnerability, as researchers may inadvertently expose API credentials in publicly shared code repositories, enabling unauthorized access and financial liability. We quantified the prevalence and temporal trends of such exposures. In a cross-sectional analysis of 55,817 healthcare-related LLM research papers returned by a PMC search restricted to 2018 to 2025, we scanned repositories linked to 5,322 papers, examining both the latest snapshot and the complete commit history for hardcoded API credentials using service-specific regular expressions with multi-stage false-positive filtering and manual verification. Exposures were confirmed in 22 papers (0.41%), predominantly OpenAI-format (50%) and HuggingFace (32%) credentials. Exposure rates rose from 0.142% (2018 to 2023) to 0.203% in 2024 and 0.698% in 2025, a 3.4-fold year-over-year increase (Cochran-Armitage test for trend, P = .005). Scanning the complete commit history revealed more than twice as many exposures as the latest snapshot (52 vs. 22 papers), with 30 (58%) recoverable only from deleted commits. Because key validity was not tested, this low-frequency but growing vulnerability poses a risk to patient data and finances that is at present theoretical; as code-sharing mandates expand, integrating security safeguards into publishing workflows warrants consideration.
No takes yet. Share an insight, caveat, or question.
Jun et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: