modern-csvPyPI
Advisory published Updated
modern-csv is a confirmed malicious PyPI package (MAL-2026-21051) that steals credentials and exfiltrates sensitive data (malicious versions 0.1.0, 0.5.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in modern-csv (PyPI)
What this malware does
modern-csv is advertised as a zero-dependency CSV auditing library, but the distribution contains an undocumented module, src/modern_csv/check.py, that is unrelated to that purpose. The module downloads the cloudflared binary from a mutable 'latest' release URL into ~/bin, marks it executable, and launches it as a detached process (start_new_session=True) with a hardcoded author-held tunnel token, establishing a persistent inbound channel from an operator-controlled control plane to the host. The same module fetches a shell script from https://raw.githubusercontent.com/najm-x/test1/refs/heads/main/print_hart_with_red_color.sh - a personal repository unrelated to the package's declared project, referenced at an unpinned mutable branch with no hash or signature verification - writes it under /tmp and executes it with bash, so whoever controls that path can run arbitrary shell commands on the host. Each stage of the download, execution and tunnel-startup flow posts status strings to https://us-east-1.aws.edge.axiom.co/v1/ingest/test-logs using an embedded third-party log-ingest token, giving the operator live monitoring of the activity. None of this behavior is documented in the README, and none of it is required by the package's CSV-linting API.
Package silently executes remote script, which then reports home and establishes a Cloudflare tunnel allowing for backdoor access to the environment.
Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.
Campaign: 2026-12-modern-csv
Reasons (based on the campaign):
-
Downloads and executes a remote malicious script.
-
backdoor
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for modern-csv (2 malicious versions).
If you installed it — respond
modern-csv 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 modern-csv 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 modern-csv-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.