MAL-2026-21051: Malicious code in modern-csv (PyPI)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (6f177d085d448117f0d1a85abad9363ff4426efe09ac44a80da66a98ab37beae) modern-csv is advertised as a zero-dependency CSV auditing library, but the distribution contains an undocumented module, src/moderncsv/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 (startnewsession=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/printhartwithredcolor.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.
Source: kam193 (f33c6b913e14d8c9361576963dc9637e139de922a26da03eb615052fe06ef3b7) 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
Affected Software
Event History
Frequently Asked Questions
What access could an attacker gain if this package runs?
The package downloads and executes a remote script, reports back to its operator, and establishes a Cloudflare tunnel. This can provide backdoor access to the environment where it is executed.
What should teams do if they have installed or run this package?
Treat the affected environment as potentially compromised because the package may have established remote access. Investigate for the downloaded script, outbound reporting activity, and Cloudflare tunnel activity, then remove the package and rotate credentials or secrets available to that environment.