{"id":"MAL-2026-21051","summary":"Malicious code in modern-csv (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (6f177d085d448117f0d1a85abad9363ff4426efe09ac44a80da66a98ab37beae)\nmodern-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.\n\n## Source: kam193 (f33c6b913e14d8c9361576963dc9637e139de922a26da03eb615052fe06ef3b7)\nPackage silently executes remote script, which then reports home and establishes a Cloudflare tunnel allowing for backdoor access to the environment.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-12-modern-csv\n\n\nReasons (based on the campaign):\n\n\n - Downloads and executes a remote malicious script.\n\n\n - backdoor\n","modified":"2026-12-03T21:30:05.339800377Z","published":"2026-12-03T17:34:40Z","database_specific":{"iocs":{"urls":["https://raw.githubusercontent.com/najm-x/test1/refs/heads/main/print_hart_with_red_color.sh"]},"malicious-packages-origins":[{"versions":["0.1.0","0.5.0"],"id":"pypi/2026-12-modern-csv/modern-csv","import_time":"2026-12-03T18:16:46.228086370Z","modified_time":"2026-12-03T17:34:40.172462Z","sha256":"f33c6b913e14d8c9361576963dc9637e139de922a26da03eb615052fe06ef3b7","source":"kam193"},{"source":"amazon-inspector","versions":["0.1.0"],"id":"IN-MAL-2026-023231","import_time":"2026-12-03T21:13:17.818609422Z","modified_time":"2026-12-03T21:03:04Z","sha256":"592cd000c23100d095b1c45cf6a5a0d0fb014040311d88a13a283e6f9cdd5a9e"},{"source":"amazon-inspector","versions":["0.5.0"],"id":"IN-MAL-2026-023232","import_time":"2026-12-03T21:13:17.920045394Z","modified_time":"2026-12-03T21:03:17Z","sha256":"6f177d085d448117f0d1a85abad9363ff4426efe09ac44a80da66a98ab37beae"}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/modern-csv"},{"type":"PACKAGE","url":"https://pypi.org/project/modern-csv/0.1.0/"},{"type":"PACKAGE","url":"https://pypi.org/project/modern-csv/0.5.0/"}],"affected":[{"package":{"name":"modern-csv","ecosystem":"PyPI","purl":"pkg:pypi/modern-csv"},"versions":["0.1.0","0.5.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/modern-csv/MAL-2026-21051.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"package_integrity":[{"filename":"modern_csv-0.1.0-py3-none-any.whl","hashes":{"blake2b_256":"6327bc6e8cefe19ddcfdaccf9d7315c6a4bde86fb05e1009a2b2a49151ccccf5","md5":"cc8e62893b4c56144637a560dd0196e5","sha256":"17272628d55b13c1ddfc28c00155178044002fdfecae9be0dfabf63dc6f8627b"}},{"hashes":{"sha256":"6fb3600dc2955165d534fdc2962be803facb0845c3fddd8e776f2cb94c8c3c7e","blake2b_256":"f84448a71df533d97607f80dc066a055755c7b0345e2a2f7ffbc48302a0b3b78","md5":"88580e8e0ee3afc018c064247f1988e7"},"filename":"modern_csv-0.1.0.tar.gz"}],"evidence_files":[{"artifacts":["modern_csv-0.1.0.tar.gz","modern_csv-0.1.0-py3-none-any.whl"],"path":"src/modern_csv/check.py","sha256":"8ae763e1d353f78e5dd325e3135205ada656d97ffec3f0781fbed09e7663dc60","tlsh":"8cc19580ed4e5722a2c3d1356491ada3f316541b6e029c387dcec9d82f1a27ac47c6dd"}]}}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"REPORTER"}]}