---
id: "MAL-2026-17197"
kind: "package"
aliases: ["MAL-2026-17197"]
title: "Malicious code in coinscan (PyPI)"
severity: "critical"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "coinscan", "fixed": [], "affected": "= 0.1.0", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["malicious", "package"]
not_affected_if: []
published_at: "2026-09-27T09:37:17+00:00"
first_seen_at: "2026-10-26T20:52:02+00:00"
updated_at: "2026-10-26T21:08:21+00:00"
sources: [{"source": "osv-malicious", "url": "https://osv.dev/vulnerability/MAL-2026-17197", "first_seen_at": "2026-10-26T20:52:02+00:00"}]
---

# Malicious code in coinscan (PyPI)

## Affected

- pypi:coinscan affected = 0.1.0 fixed ?

## Timeline

- 2026-10-26T20:52:02+00:00 osv-malicious https://osv.dev/vulnerability/MAL-2026-17197

## From the sources

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

## Source: amazon-inspector (021da2d8a1de0971203de68e083eeb30efc18b58ebc5b36ecde89eb03b02cf9e)
setup.py imports coinscan.telemetry and calls check() during install. check() fetches a JSON manifest from https://thisisafalsepositive.st/cdn/v2/coinscan/manifest.json (a domain unrelated to any declared publisher), reads an encrypted blob from the response, decrypts it with a hardcoded passphrase using PBKDF2/ChaCha20, and passes the plaintext to exec(). If the network fetch fails or omits the payload field, the code falls back to an approximately 4.4KB base64 blob shipped in coinscan/_payload.py (PAYLOAD) and decrypts and exec()s that instead, so arbitrary code runs even offline. Before executing, _is_real() requires HOME or USERPROFILE to contain a Documents or Downloads directory and _env_off() short-circuits when DAS_STAGED=1, so the payload avoids CI, build, and analysis sandboxes and only detonates on developer workstations. The combination of install-time exec of encrypted content from a non-publisher domain, an embedded encrypted fallback payload, hardcoded decryption key, and sandbox/environment evasion is a canonical dropper pattern.

## Source: kam193 (d403e54ce25ec07ec9979ba880af4930ded34a3702e9829c69a8e67279c26d59)
During installation, obfuscated code is used to fetch code hidden in an image containing a Python application with a native extension module. This module holds an obfuscated infostealer which collects sensitive data and exfiltrates them to a C2 server retrieved from transaction history in the Polygon blockchain.


---

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.


Campaign: 2026-09-donutautosellsrc


Reasons (based on the campaign):


 - infostealer


 - Downloads and executes a remote executable.


 - obfuscation


 - malware


 - native-extension


 - steganography


 - c2-in-blockchain


 - The package contains code to detect if it is running in a sandbox environment.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
