Pith. sign in

REVIEW 3 cited by

MalGuard: Towards Real-Time, Accurate, and Actionable Detection of Malicious Packages in PyPI Ecosystem

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2506.14466 v1 pith:6MEDMRO2 submitted 2025-06-17 cs.CR

MalGuard: Towards Real-Time, Accurate, and Actionable Detection of Malicious Packages in PyPI Ecosystem

classification cs.CR
keywords maliciouspackagesmalguardanalysisdetectionmodelsfeaturemodel
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
Share X Bluesky LinkedIn Reddit HN
read the original abstract

Malicious package detection has become a critical task in ensuring the security and stability of the PyPI. Existing detection approaches have focused on advancing model selection, evolving from traditional machine learning (ML) models to large language models (LLMs). However, as the complexity of the model increases, the time consumption also increases, which raises the question of whether a lightweight model achieves effective detection. Through empirical research, we demonstrate that collecting a sufficiently comprehensive feature set enables even traditional ML models to achieve outstanding performance. However, with the continuous emergence of new malicious packages, considerable human and material resources are required for feature analysis. Also, traditional ML model-based approaches lack of explainability to malicious packages.Therefore, we propose a novel approach MalGuard based on graph centrality analysis and the LIME (Local Interpretable Model-agnostic Explanations) algorithm to detect malicious packages.To overcome the above two challenges, we leverage graph centrality analysis to extract sensitive APIs automatically to replace manual analysis. To understand the sensitive APIs, we further refine the feature set using LLM and integrate the LIME algorithm with ML models to provide explanations for malicious packages. We evaluated MalGuard against six SOTA baselines with the same settings. Experimental results show that our proposed MalGuard, improves precision by 0.5%-33.2% and recall by 1.8%-22.1%. With MalGuard, we successfully identified 113 previously unknown malicious packages from a pool of 64,348 newly-uploaded packages over a five-week period, and 109 out of them have been removed by the PyPI official.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. PyFEX: Uncovering Evasive Python-based Threats via Resilient and Exhaustive Path Exploration

    cs.CR 2026-06 unverdicted novelty 6.0

    PyFEX forces exhaustive path exploration with crash recovery via dummy objects and automated entry-point discovery to reveal evasive Python malware behaviors missed by prior tools, detecting 212 new malicious packages...

  2. LLM-Enhanced Hierarchical Heterogeneous Graph Representation Learning for Malicious Python Package Detection

    cs.CR 2026-07 conditional novelty 5.5

    H2GLM combines LLM-inferred function roles with hierarchical heterogeneous GNN message passing to detect and localize malicious Python packages more accurately than prior ML, graph, and LLM baselines.

  3. An Evaluation of Large Language Models for Detection of Malicious Python Packages

    cs.CR 2026-02 conditional novelty 5.0

    LLMs detect malicious PyPI packages reasonably at package level but identify specific malicious code indicators poorly, a 'granularity gap' that limits them to triage.