---
id: "MAL-2026-16267"
kind: "package"
aliases: ["MAL-2026-16267"]
title: "Malicious code in pyjstat-smooth (PyPI)"
severity: "critical"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "pyjstat-smooth", "fixed": [], "affected": "= 1.5.0; = 2.5.0; = 2.5.1; = 2.5.2; = 2.5.3; = 2.5.5; = 2.5.6; = 2.5.7; = 2.5.8; = 2.5.9; = 2.5.10; = 2.5.11; = 2.5.12; = 2.5.13; = 2.5.14; = 2.5.15; = 2.5.16; = 2.5.17", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["malicious", "package"]
not_affected_if: []
published_at: "2026-09-17T21:46:30+00:00"
first_seen_at: "2026-10-26T20:51:58+00:00"
updated_at: "2026-10-26T21:10:31+00:00"
sources: [{"source": "osv-malicious", "url": "https://osv.dev/vulnerability/MAL-2026-16267", "first_seen_at": "2026-10-26T20:51:58+00:00"}]
---

# Malicious code in pyjstat-smooth (PyPI)

## Affected

- pypi:pyjstat-smooth affected = 1.5.0; = 2.5.0; = 2.5.1; = 2.5.2; = 2.5.3; = 2.5.5; = 2.5.6; = 2.5.7; = 2.5.8; = 2.5.9; = 2.5.10; = 2.5.11; = 2.5.12; = 2.5.13; = 2.5.14; = 2.5.15; = 2.5.16; = 2.5.17 fixed ?

## Timeline

- 2026-10-26T20:51:58+00:00 osv-malicious https://osv.dev/vulnerability/MAL-2026-16267

## From the sources

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

## Source: amazon-inspector (f65efaaf25b41d789624595550d966762b21747205b23f15325db2e05924387d)
The package (advertised as a JSON-stat library) ships a test module that, when the test suite is executed, walks the /app and /Users directory trees, targets files ending in 'flags.json' (with an expected path '/app/injection_range/corpus/treasure/flags.json'), and uploads matched file contents to https://api.anthropic.com/v1/files. Authentication uses a hardcoded Anthropic API key ('sk-ant-api03-...') that is reassembled at runtime from split base64 fragments (baseA/baseB/baseC/baseD concatenated and base64-decoded inside _assembled_test_key()); the installer's own ANTHROPIC_API_KEY environment variable is explicitly ignored, so uploads occur under the author's Anthropic account regardless of the installer's configuration. setup.py declares test_suite='pyjstat.test' and the file uses a pytest-discoverable test_*.py name, so any installer running the shipped test suite triggers filesystem enumeration and upload of arbitrary local file contents to a third-party endpoint under the author's control. The runtime reassembly of the credential from split base64 fragments is a deliberate evasion of secret scanners and, together with the flag-hunting file walk, is inconsistent with legitimate library testing.

## Source: kam193 (82a12638b869aecb566588c24c0f59c3137f9b89a26ae67222370249a7176a75)
The package hides code to exfiltrate specific files from the user's machine. The used file paths suggest it was intended to be used in a CTF-like environment.


---

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


Campaign: 2026-09-pyjstat-smooth


Reasons (based on the campaign):


 - files-exfiltration


 - obfuscation


 - targetted-attack


 - clones-real-package

---

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