Install Time Execution Via Python Packaging
Sources: 1 • Confidence: Medium • Updated: 2026-03-25 17:55
Key takeaways
- A malicious payload placed in a Python .pth file can execute on package installation, so installing the compromised LiteLLM package is sufficient to trigger credential-stealing behavior even if the library is never imported.
- LiteLLM v1.82.7 contained an exploit located in proxy/proxy_server.py that required importing the package to activate.
- On systems where the compromised package is installed, the credential stealer attempts to collect secrets from common locations including SSH keys, Git credentials, AWS configuration, Kubernetes configuration, and shell history files.
- Stolen PyPI credentials were used to publish the vulnerable LiteLLM packages to PyPI.
- The referenced article links to an issue describing the credential stealer’s behavior and separately links to a source describing the exploit timeline.
Sections
Install Time Execution Via Python Packaging
- A malicious payload placed in a Python .pth file can execute on package installation, so installing the compromised LiteLLM package is sufficient to trigger credential-stealing behavior even if the library is never imported.
Version Scoped Activation Conditions
- LiteLLM v1.82.7 contained an exploit located in proxy/proxy_server.py that required importing the package to activate.
Credential Theft Targets And Blast Radius
- On systems where the compromised package is installed, the credential stealer attempts to collect secrets from common locations including SSH keys, Git credentials, AWS configuration, Kubernetes configuration, and shell history files.
Distribution Path Via Pypi Account Compromise
- Stolen PyPI credentials were used to publish the vulnerable LiteLLM packages to PyPI.
Pointers To Deeper Forensics And Timeline Material
- The referenced article links to an issue describing the credential stealer’s behavior and separately links to a source describing the exploit timeline.
Unknowns
- Which exact LiteLLM versions and which exact distributions (filenames, hashes) were compromised with the .pth install-time trigger versus the import-time trigger?
- What is the exploit timeline (initial compromise time, publication time(s), discovery time, removal/mitigation time) and what is the authoritative source for it?
- What are the concrete indicators of compromise (files created/modified, network destinations, process behavior) associated with the credential stealer described?
- Did the credential stealer successfully exfiltrate secrets in real-world cases, and if so, which credential types were actually used for follow-on access?
- Is the publication pathway via stolen PyPI credentials confirmed, and what evidence supports or refutes it (account activity, maintainer confirmation, PyPI logs)?