pyjstat-smoothPyPI
Advisory published Updated
pyjstat-smooth is a confirmed malicious PyPI package (MAL-2026-16267) that steals credentials and exfiltrates sensitive data (malicious versions 1.5.0, 2.5.0, 2.5.1…). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in pyjstat-smooth (PyPI)
What this malware does
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.
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
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for pyjstat-smooth (18 malicious versions).
If you installed it — respond
pyjstat-smooth is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If pyjstat-smooth was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- Kamil Mańkowski (kam193) · reporter
Detect & block this
O3 blocks pyjstat-smooth-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.