Installing Python packages can run malicious code; teams urged to pin hashes and delay new releases
A recent compromised LiteLLM release on PyPI reportedly stole credentials and planted a backdoor, highlighting that installing packages can execute code. The article explains that malicious code can run before import through setup.py in source distributions, through .pth files in site-packages that execute at interpreter startup, or via transitive dependencies. Attackers typically target environment variables, cloud and SSH credentials, and CI secrets before exfiltrating them. The suggested defenses include pinning exact artifact hashes, avoiding source distributions, applying a seven-day cooldown on new releases, and running pip-audit in CI.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in