Exposed API keys in the public code repositories of healthcare large language model research

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.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-08-24
DOI
https://doi.org/10.1038/s41598-026-68075-8
Primary Topic
Scientific Computing and Data Management
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Exposed API keys in the public code repositories of healthcare large language model research

Jungyo Suh, Tae Joon Jun
Scientific Reports
Scientific Computing and Data Management
article

Exposed API keys in the public code repositories of healthcare large language model research

Jungyo Suh, Tae Joon Jun
article en

Abstract

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.

Scientific Reports
Ulsan College (KR), University of Ulsan (KR), Artificial Intelligence in Medicine (Canada) (CA)
Peace, Justice and strong institutions
Openalex Percentile: Top 4%
Scientific Computing and Data Management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.