Malicious package · PyPI
Malicious code in neutrl-contracts (PyPI)
2.0.02.0.12.0.2No safe version. Remove it.What it does
Review of neutrl-contracts 2.0.2 on PyPI did not surface any code paths that exfiltrate installer data, execute attacker-controlled payloads at install or import time, relay caller data to a hardcoded third-party destination, ship live third-party credentials, or establish a backdoor. No install-time network I/O, no lifecycle-hook shell execution, and no credential or filesystem reconnaissance were observed in the package's files.
Reported by kam193 This package intentionally depends on a malicious package.
This campaign exfiltrates sensitive environment variables, SSH keys, dotenv files and other credentials. The malicious code is hidden in a dependency package (e.g. neutrl-core) in a function disguised as telemetry, and requires activates once the attacker-controlled endpoint delivers the command. While the user can provide their blockchain endpoints, the code makes sure the malicious endpoint is always included in the configuration. In analyzed versions, the dependent packages did not use the malicious code but were clearly prepared for the supply chain attack.
No fix · Remove and contain
pip uninstall neutrl-contractsSources