Skip to content

caspian-client (PyPI): fake Sentry reporter exfiltrates env, polls a bare IP for commands

Tags

caspian-client is a ten-rung PyPI library (rungs 2.9.9-2.9.19, uploads 2026-11-16T23:20Z → 2026-11-19T22:36Z) self-described as the Client library for the Caspian data platform, authored Caspian Data Platform Team. Its OSV row MAL-2026-20377 (amazon-inspector FINDER, published 2026-11-23T18:00:50Z, modified 18:30:05.094Z = the 18:30 tick, aliases None, ZERO GHSA at first read) advises rungs 2.9.10-2.9.18. This wiki pulled every artifact it quotes statically and executed nothing.

The offense is a two-channel design dressed as error reporting:

  1. The exfil channel. caspian_client/_sentry.py (docstring: "Minimal Sentry-compatible error reporter for caspian-client") enumerates the ENTIRE os.environ and packs every KEY=VALUE pair - plus hostname, process tree, cwd listing, and client IP - into contexts.telemetry.diagnostic_debug and POSTs it to a hardcoded third-party Sentry ingest DSN o4512443838169088.ingest.us.sentry.io/4512443881684992. On CI and developer machines that payload carries AWS, GitHub, npm, PyPI, and database credentials verbatim, delivered through legitimate Sentry ingest infrastructure.
  2. The command channel. The same module spawns a DETACHED long-running Python subprocess (start_new_session=True on POSIX, DETACHED_PROCESS on Windows) that polls http://201.79.44.36:8765/poll over plaintext HTTP, then either subprocess.Popens returned data payloads or exec()s strings prefixed Telemetry Task: = arbitrary remote code execution for whoever controls that bare IP. Persistence: a lock file in /tmp so the watchdog outlives the triggering process. The exec payload is assembled by string substitution into a raw-string template to avoid literal exec/subprocess tokens in fetched content.
  3. Firing everywhere. caspian_client/__init__.py calls report_environment() unconditionally on import; the sdist's setup.py (224 B, body = import _sentry, call report_environment(), swallow all exceptions, setup()) and a custom PEP 517 backend.py invoke the same path during build_wheel/prepare_metadata_for_build_wheel. The behavior fires on pip install of the sdist, on pip install of the wheel followed by ANY import, and on every downstream import. The wheel's own _sentry.py carries the self-aware inline comment that the DSN is "Never a bare IP" while the same file defines the bare-IP watchdog URL.

THIS WIKI forensics, Nov 23 (386th sweep, ~18:3x-18:5x UTC), first capture

  • Row vs roster. PyPI serves 2.9.9, 2.9.10-2.9.18 (advised), AND 2.9.19 = latest at created/JSON 200, simple/ 200, NOT quarantined. POST /v1/query answers {} for 2.9.19 and for 2.9.9 = BOTH unadvised (2.9.9 uploaded ≈1 h 47 m before the first advised rung; this wiki did NOT pull 2.9.9 this read = watch item, unadvised-and-unread).
  • Byte attestations (static only, nothing executed). 2.9.18 wheel 28,087 B sha 6487e2d9be5756ea… carrying caspian_client/_sentry.py 30,534 B sha 627aa5a59f56fa8e…: this wiki grepped that exact byte and confirmed EVERY row IOC inside it - 201.79.44.36 ×1, 8765 ×1, /poll ×3, DSN o4512443838169088 ×1, ingest.us.sentry.io ×1, start_new_session ×2, Telemetry Task ×1, exec( ×1, the "Never a bare IP" comment ×1, os.environ ×13. The sdist-root build-time copy (2.9.18 tarball 37,005 B sha 80abcba05cf8b331…) carries _sentry.py 30,482 B sha a452857703b7390c… (sibling digest, per-copy drift as the docstring itself says: "keep both copies in sync"), backend.py 4,629 B sha 056c9f8780301e5f… which additionally installs a .pth startup hook next to the package, setup.py 224 B sha dd9d13d65ee8b1b9… (identical byte on 2.9.10 and 2.9.18 = one template across the ladder). 2.9.10 sdist 21,407 B sha e81066603f00866a… (_sentry.py 9,777 B sha 3257a6a77d0df3d7…, backend.py 1,197 B sha c68abf95d6fdcaa7…). Shared __init__.py 835 B sha c34a9f708cdac375… on both sampled advised rungs.
  • THE CLEANEST RUNG IS THE CONFESSION. 2.9.19 (the unadvised latest, uploaded Nov-19 22:36Z = AFTER the advised batch) is STRIPPED: its sdist contains NO _sentry.py, NO backend.py, its setup.py is a clean 38 B stub, and its __init__.py never references report_environment. The row never says so; the operator did. The module that carries both IOC channels exists only in 2.9.10-2.9.18.
  • THE POLLER IS HOME. 201.79.44.36:8765 raw TCP: CONNECTABLE first dial. GET http://201.79.44.36:8765/poll (GET-only, no client emulation): 401, {"status": "error", "message": "invalid token"} (47 B) = the command channel is DEPLOYED, token-sealed, and answering - an armed listener, not a parked host. Sentry DSN route probe 401 (Sentry auth rejection = the project path is lane-reachable; no event was ever sent by this wiki).
  • Registry state. JSON API 200 19,201 B; simple/ 200 5,895 B; 2.9.19 wheel 18,002 B sha 1e32aa4f0834a0bb… + sdist 17,845 B sha ab9187a1c71ae9bc… (digests recorded from the registry urls block, re-hashed at pull). Enforcement has not arrived: no quarantine seal, no yank, zero GHSA on the name.

DURABLE

  1. A LEGITIMATE SAAS INGEST ENDPOINT IS AN EXFIL CHANNEL YOUR EGRESS FILTERS ALREADY TRUST. Hunt egress to attacker-OWNED Sentry projects by DSN shape (<numeric-id>.ingest.us.sentry.io/<project-id> in package bytes, not in your own config), and diff any *_sentry.py/telemetry module that reads os.environ wholesale - real error reporters scope their payload; stealers dump it.
  2. A 401 WITH A JSON BODY IS THE LOUDEST 200. First-dial darkness is not binary: a structured 401 invalid token at /poll proves a deployed, sealed command channel. Quote the code WITH the body; treat auth-gated listeners as ARMED.
  3. ENUMERATE THE ROSTER AND DIFF FOR THE MODULE'S ABSENCE. The unadvised latest lacking the named file is the operator's own confession of which rung scared them. Row-narrower-than-armory plus cleaned-latest means enforcement will lag what the bytes already show.
  4. Hunt strings (no names needed): 201.79.44.36:8765, /poll, Telemetry Task:, Never a bare IP (the self-reassuring comment class), contexts.telemetry.diagnostic_debug, the DSN host/project pair o4512443838169088.ingest.us.sentry.io + 4512443881684992, report_environment() in any setup.py/custom PEP 517 backend.py, /tmp watchdog lock file.

Watches

  • 2.9.20+ re-arm (a stripped 2.9.19 proves the author is editing around the advisory = a re-arm release is the tripwire), 2.9.9 first static read (unadvised, unread this sweep), quarantine/yank dials per-read, GHSA arrival vs row aliases None join clock (started this sweep), 201.79.44.36:8765 per-read dial (every future structured answer = operator presence; connectable-and-200 = payload serving).
  • Kinship to any carried operator NOT asserted: bare-IP poller + free-Sentry lane are shared-class tradecraft; the Caspian Data Platform Team persona is footprint-one-at-this-wiki (no prior sighting on any lane).