Malicious code in gcp-log-poc (PyPI)
- MAL-2026-18753
Description
Show the whole descriptionHide the whole description
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. During import, package exfiltrates information about the environment, including potentially sensitive environment variables. --- Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers. Campaign: 2026-11-gcp-log-poc Reasons (based on the campaign): - exfiltration-env-variables - The package contains code to exfiltrate basic data from the system, like IP or username. It has a limited risk.
Text from the OSV record.
Recommendation
Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.
Affected
gcp-log-pocPyPI
No versions listed
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.