# GHSA-86Q3-GH9F-62FV: Malicious code in caspian-client (PyPI)

- Database: GitHub
- Malicious package: yes
- Published: 2026-11-23
- Modified: 2026-11-23

## Affected versions

- caspian-client (PyPI): 2.9.15
- caspian-client (PyPI): 2.9.18
- caspian-client (PyPI): 2.9.13
- caspian-client (PyPI): 2.9.11
- caspian-client (PyPI): 2.9.10
- caspian-client (PyPI): 2.9.17
- caspian-client (PyPI): 2.9.16
- caspian-client (PyPI): 2.9.12

## Description

## Source: amazon-inspector (0f39350a4bccbbf4d02120154b9bece376075768e87e32a3f3536c4dd9503d4b)
caspian_client/__init__.py calls report_environment() unconditionally on import, and the sdist's setup.py plus the custom PEP 517 backend.py invoke the same path during build_wheel / prepare_metadata_for_build_wheel, 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 (start_new_session=True on POSIX, DETACHED_PROCESS 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, _common_fields() enumerates the entire os.environ and packs every KEY=VALUE pair into contexts.telemetry.diagnostic_debug 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.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/ecf0b8cd6f8ea20e0b0c22a6cf0d7a13830bb9ef/osv/malicious/pypi/caspian-client/MAL-2026-20377.json))

## References

- https://github.com/ossf/malicious-packages/blob/ecf0b8cd6f8ea20e0b0c22a6cf0d7a13830bb9ef/osv/malicious/pypi/caspian-client/MAL-2026-20377.json
- https://pypi.org/project/caspian-client/2.9.10
- https://pypi.org/project/caspian-client/2.9.11
- https://pypi.org/project/caspian-client/2.9.12
- https://pypi.org/project/caspian-client/2.9.13
- https://pypi.org/project/caspian-client/2.9.15
- https://pypi.org/project/caspian-client/2.9.16
- https://pypi.org/project/caspian-client/2.9.17
- https://pypi.org/project/caspian-client/2.9.18
- https://github.com/advisories/GHSA-86q3-gh9f-62fv

Page: https://cve.now/GHSA-86Q3-GH9F-62FV

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
