MAL-2026-20377: Malicious code in caspian-client (PyPI)

Published Nov 23, 2026
·
Updated

--- -= Per source details. Do not edit below this line.=-

Source: amazon-inspector (0f39350a4bccbbf4d02120154b9bece376075768e87e32a3f3536c4dd9503d4b) caspianclient/init.py calls reportenvironment() unconditionally on import, and the sdist's setup.py plus the custom PEP 517 backend.py invoke the same path during buildwheel / preparemetadataforbuildwheel, so the behavior fires on pip install of the sdist, on pip install of the wheel followed by any import, and on any downstream import of the package. sentry.py spawns a detached long-running Python subprocess (startnewsession=True on POSIX, DETACHEDPROCESS on Windows) that polls the hardcoded bare-IP endpoint http://201.79.44.36:8765/poll over plaintext HTTP and either launches subprocess.Popen on returned 'data' payloads or passes strings prefixed 'Telemetry Task: ' to exec(), giving the operator of that endpoint arbitrary remote code execution on the host. The watchdog is persisted via a lock file in /tmp and outlives the triggering process. In parallel, commonfields() enumerates the entire os.environ and packs every KEY=VALUE pair into contexts.telemetry.diagnosticdebug along with hostname, process tree, cwd listing and client IP, then POSTs the payload to a hardcoded third-party Sentry ingest DSN (o4512443838169088.ingest.us.sentry.io/4512443881684992). On CI and developer machines this harvests AWS, GitHub, npm, PyPI and database credentials verbatim. The module is named sentry.py and carries a docstring describing a 'minimal Sentry-compatible error reporter' with an inline comment asserting the DSN is 'Never a bare IP', while the same file defines the bare-IP watchdog URL; the exec payload is assembled by string substitution into a raw-string template to avoid literal exec/subprocess tokens in the fetched content. The declared data-platform-API-client purpose does not require environment scraping or a polling connector.

Affected Software

1 affected component
pip/caspian-client=2.9.15, =2.9.18, =2.9.13, =2.9.11, =2.9.10, =2.9.17, =2.9.16, =2.9.12

Event History

Nov 23, 2026
Advisory Published
via OSV·06:00 PM
Data Sourced
via OSV·06:00 PM
DescriptionAffected Software

Frequently Asked Questions

1

When can the malicious behavior run?

It can run during pip installation from an sdist because setup.py and the custom PEP 517 backend invoke it while building metadata or a wheel. For wheel installs, it runs when the package is imported, including through a downstream package that imports it.

2

What access does an attacker gain if the package contacts its control endpoint?

The endpoint operator can cause arbitrary code execution on the host. Returned data can be launched through subprocess.Popen, while strings beginning with "Telemetry Task: " are passed to exec().

3

Does the behavior persist after installation or import completes?

Yes. The package starts a detached, long-running Python subprocess and uses a lock file in /tmp for watchdog persistence, allowing it to outlive the process that triggered it.

4

What data may be exposed before remote commands are received?

The code collects all environment variables as KEY=VALUE pairs, along with hostname and process-tree information, and places them in telemetry diagnostic data. It communicates with the hardcoded endpoint at 201.79.44.36:8765 over plaintext HTTP.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203