|
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
|
| Volume 187 - Issue 154 |
| Published: November 2026 |
| Authors: Mohanad Ali Al-Alwan, Ahmad Hweishel A. Alfarjat, Wael Ibrahim A. Almazaydeh, Rajesha N. |
10.5120/ijcac5359e5ec96e
|
Mohanad Ali Al-Alwan, Ahmad Hweishel A. Alfarjat, Wael Ibrahim A. Almazaydeh, Rajesha N. . Slopsquatting-Aware Detection of Malicious PyPI Packages via Interpretable Multi-Signal Risk Fusion. International Journal of Computer Applications. 187, 154 (November 2026), 1-8. DOI=10.5120/ijcac5359e5ec96e
@article{ 10.5120/ijcac5359e5ec96e,
author = { Mohanad Ali Al-Alwan,Ahmad Hweishel A. Alfarjat,Wael Ibrahim A. Almazaydeh,Rajesha N. },
title = { Slopsquatting-Aware Detection of Malicious PyPI Packages via Interpretable Multi-Signal Risk Fusion },
journal = { International Journal of Computer Applications },
year = { 2026 },
volume = { 187 },
number = { 154 },
pages = { 1-8 },
doi = { 10.5120/ijcac5359e5ec96e },
publisher = { Foundation of Computer Science (FCS), NY, USA }
}
%0 Journal Article
%D 2026
%A Mohanad Ali Al-Alwan
%A Ahmad Hweishel A. Alfarjat
%A Wael Ibrahim A. Almazaydeh
%A Rajesha N.
%T Slopsquatting-Aware Detection of Malicious PyPI Packages via Interpretable Multi-Signal Risk Fusion%T
%J International Journal of Computer Applications
%V 187
%N 154
%P 1-8
%R 10.5120/ijcac5359e5ec96e
%I Foundation of Computer Science (FCS), NY, USA
PyPI accepts uploads from anyone, and the code in a package runs as soon as the package is installed. Attackers have used this for years. More recently, coding assistants based on large language models (LLMs) have created another opening, because they sometimes recommend packages that do not exist. If an attacker registers such an invented name (slopsquatting), developers who follow the model’s advice install the attacker’s package. This paper describes a static detector for malicious PyPI packages that looks at three kinds of evidence in each upload: the code that runs at install time, the metadata stored in the archive, and the risk carried by the package name, which includes a check against names that LLMs are known to hallucinate. The three scores are merged with learned weights that cannot be negative and must add up to one, so for any alert an analyst can see how much each kind of evidence contributed. For testing, 1,569 malicious packages were taken from Datadog’s public collection, and 1,313 benign ones were downloaded from PyPI, some popular and some rarely used. Five-fold cross-validation gave F1 = 0.969 (bootstrap interval 0.964 to 0.976) with 1.6% of benign packages flagged. When the threshold was set so that only one benign package in a thousand is flagged, 89.7% of the malware was still detected, compared with 40.3% for code analysis alone. On the same 533 packages, the threat rules of the GuardDog scanner gave an FPR of 23.8% against 2.1% for the proposed score (McNemar test, p < 10−12). Performance fell to an F1 score of 0.862 for attacks first reported in 2025–2026, and only 3 of 17 compromised releases of legitimate libraries were detected.