SourceBroken: A large-scale analysis on the (un)reliability of SourceRank in the PyPI ecosystem

Montaruli, Biagio; Ponta, Serena Elisa; Compagna, Luca; Balzarotti, Davide
SAC 2026, 41st ACM/SIGAPP Symposium on Applied Computing, 23-27 March 2026, Thessaloniki, Greece

SourceRank is a scoring system made of 18 metrics that assess the popularity and quality of open-source packages. Despite being used in several recent studies, none has thoroughly analyzed its reliability against evasion attacks aimed at inflating the score of malicious packages, thereby masquerading them as trustworthy. To fill this gap, we first propose a threat model that identifies potential evasion approaches for each metric, including the URL confusion technique, which can affect 5 out of the 18 metrics by leveraging a URL pointing to a legitimate repository potentially unrelated to the malicious package.

Furthermore, we study the reliability of SourceRank in the PyPI ecosystem by analyzing the SourceRank distributions of benign and malicious packages in the state-of-the-art MalwareBench dataset, as well as in a real-world dataset of 122,398 packages. Our analysis reveals that, while historical data suggests a clear distinction between benign and malicious packages, the real-world distributions overlap significantly, mainly due to SourceRank's failure to timely reflect package removals. As a result, SourceRank cannot be reliably used to discriminate between benign and malicious packages in real-world scenarios, nor to select benign packages among those available on PyPI.

Finally, our analysis reveals that URL confusion represents an emerging attack vector, with its prevalence increasing from 4.2% in MalwareBench to 7.0% in our real-world dataset. Moreover, this technique is often used alongside other evasion techniques and can significantly inflate the SourceRank metrics of malicious packages.


Type:
Conférence
City:
Thessaloniki
Date:
2026-03-23
Department:
Sécurité numérique
Eurecom Ref:
8553
Copyright:
© ACM, 2026. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in SAC 2026, 41st ACM/SIGAPP Symposium on Applied Computing, 23-27 March 2026, Thessaloniki, Greece

PERMALINK : https://www.eurecom.fr/publication/8553