Malicious code in neutrl-contracts (PyPI)
The PyPI package neutrl-contracts intentionally depends on a malicious package (neutrl-core) that exfiltrates sensitive credentials including environment variables, SSH keys, and dotenv files. The malicious code is disguised as telemetry and activated remotely by an attacker-controlled endpoint.
- Disclosed
- Last updated
- Blast radius
- Unknown; depends on adoption of affected versions
- Ecosystems
- Attack vectors
- Affected entities
- neutrl-contractsPyPI package with intentional malicious dependency
The neutrl-contracts package on PyPI was found to intentionally depend on a malicious package as part of a coordinated supply chain attack campaign (2026-08-neutrl-core). The malicious code is embedded in the dependency package neutrl-core and disguised as telemetry functionality.\n\nThe attack is designed to exfiltrate sensitive credentials including environment variables, SSH keys, dotenv files, and other sensitive data. The malicious code includes remote command execution capabilities controlled by an attacker-operated endpoint. The attacker ensures their malicious endpoint is always included in the configuration, even if users attempt to provide their own blockchain endpoints.\n\nAnalyzed versions of the dependent packages did not actively use the malicious code but were clearly prepared for activation as part of the attack campaign. The incident was identified and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- neutrl-contracts
- neutrl-core
Remediation
- Remove neutrl-contracts and neutrl-core packages from all environments
- Audit and rotate all environment variables, SSH keys, and credentials that may have been exposed
- Review dotenv files and other credential stores for unauthorized access
- Monitor systems for signs of remote command execution or data exfiltration
- Check dependency trees for any other packages that may depend on neutrl-contracts or neutrl-core
- Update to patched versions if available, or use alternative packages
Sources
- GitHub Advisory GHSA-w82v-c64w-j8f5 · GitHub Advisory Database
Cite this entry
"Malicious code in neutrl-contracts (PyPI)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 10, 2026; last updated August 10, 2026. https://supplychainattack.org/incident/malicious-code-in-neutrl-contracts-pypi-1b2le5
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedhigh
Malicious code in kb-ai (PyPI)
The kb-ai package on PyPI contained malicious code designed to demonstrate a dependency confusion attack. The package exfiltrated basic system data (IP address, username) and executed arbitrary code during installation via setup.py override.
PyPICompromised packageDependency confusion - containedcritical
Malicious code in plp-contract (PyPI)
The PyPI package plp-contract intentionally depends on a malicious package (neutrl-core) designed to exfiltrate sensitive credentials including environment variables, SSH keys, and dotenv files. The malicious code is disguised as telemetry and activates via remote command delivery from an attacker-controlled endpoint.
2026 08 Neutrl CorePyPICompromised packageDependency confusion - resolvedhigh
Malicious code in cubesat-upstream-driver (PyPI)
Malicious code was published to PyPI in the cubesat-upstream-driver package, capable of collecting environment variables. The package was detected as part of a CTF-like exercise or pentest campaign and does not appear to exfiltrate data autonomously.
PyPICompromised packageDependency confusion - resolvedhigh
Malicious code in atlas-internal (PyPI)
Multiple malicious versions of atlas-internal were published to PyPI containing code that exfiltrates host information (hostname, working directory, username) during installation. The package overrides the egg_info command in setup.py to execute automatically on pip install without user interaction, sending collected data to attacker-controlled out-of-band callback servers.
PyPICompromised packageDependency confusion