Malicious package · PyPI
Malicious code in gcp-log-poc (PyPI)
0.0.10.0.20.0.3No safe version. Remove it.What it does
The package runs identical exfiltration code from both setup.py (executed on sdist install) and gcp_log_poc/init.py (executed on every import gcp_log_poc). On each trigger it collects host identifiers, the installer's public IP (fetched from api.ipify.org), and the entire os.environ dict, then ships the payload to Google Cloud Logging under the project nginxinc using log_struct. Authentication to that logging sink uses a GCP service-account JSON embedded in the source as a large base64 blob that is XOR-decoded at runtime with the hardcoded key poc-dep-confusion-2026; the decoded JSON is loaded via service_account.Credentials.from_service_account_info and passed to google.cloud.logging.Client(project="nginxinc"). The nginxinc project name and the XOR-key string identify this as a dependency-confusion payload targeting the nginxinc namespace. Environment variables routinely contain CI secrets, cloud credentials, and registry tokens, so a bulk os.environ dump to a destination the installer did not configure is credential exfiltration against the installing host.
Reported by kam193 During import, package exfiltrates information about the environment, including potentially sensitive environment variables.
No fix · Remove and contain
pip uninstall gcp-log-pocSources