{"id":"MAL-2026-3982","summary":"Malicious code in @antv/g6 (npm)","details":"Part of the **Mini Shai-Hulud** supply chain attack campaign in which a threat actor compromised the npm account `atool` and published 631 malicious versions across 314 npm packages in an automated 22-minute burst. Each malicious version injects a `preinstall` hook that executes a 498KB obfuscated Bun script, using the GitHub API as a covert exfiltration channel. Credentials are committed to attacker-controlled repositories following Dune-themed naming patterns (e.g., `harkonnen-melange-742`). Stolen data includes AWS keys, GitHub PATs, npm tokens, GCP service accounts, Azure credentials, Kubernetes service account tokens, SSH keys, Docker auth configs, database connection strings, Stripe keys, and Slack tokens. Malicious versions also establish persistence via CI/CD workflow injection (a GitHub Actions workflow named `Run Copilot` dumps all secrets via `toJSON(secrets)`), AI agent session hooks, and a system daemon named `kitty-monitor`.\n\nThis specific package (`@antv/g6`) was modified to include a malicious `preinstall` hook executing the obfuscated Bun payload.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fed27a5cc6a210a4c6196e4f36e83cf1009cbb317e3f3ca78ff9de83e0367fd4)\nThe package @antv/g6 was found to contain malicious code.\n\n## Source: ghsa-malware (184a0293555548a885f39df532f1d5f146d53dcd107c657f4ba78fee72e1601b)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n\n## Source: google-open-source-security (847ef6b381d410bf176f7414a6f0fbbcf46a5f39b6d9011e126b279bd2d781df)\nThis package was compromised as part of the ongoing \"Mini Shai-Hulud is back\" worm by the TeamPCP threat actor.\n\nThe package will steal credentials and then propogate it to every package it has access to. The package also attempts to remain persistent.\n","aliases":["GHSA-h97c-gr6h-22jm"],"modified":"2026-05-19T18:01:57.799176033Z","published":"2026-05-19T00:00:00Z","database_specific":{"malicious-packages-origins":[{"source":"google-open-source-security","modified_time":"2026-05-19T05:36:35Z","versions":["5.2.1","5.3.1"],"import_time":"2026-05-19T05:55:55.089101Z","sha256":"847ef6b381d410bf176f7414a6f0fbbcf46a5f39b6d9011e126b279bd2d781df"},{"source":"ghsa-malware","modified_time":"2026-05-19T05:57:31Z","versions":["5.3.1"],"import_time":"2026-05-19T07:32:14.793561003Z","id":"GHSA-h97c-gr6h-22jm","sha256":"184a0293555548a885f39df532f1d5f146d53dcd107c657f4ba78fee72e1601b"},{"source":"amazon-inspector","modified_time":"2026-05-19T16:47:48Z","versions":["5.2.1","5.3.1"],"import_time":"2026-05-19T17:50:30.420613958Z","sha256":"fed27a5cc6a210a4c6196e4f36e83cf1009cbb317e3f3ca78ff9de83e0367fd4"}]},"references":[{"type":"REPORT","url":"https://safedep.io/mini-shai-hulud-strikes-again-314-npm-packages-compromised/"},{"type":"ARTICLE","url":"https://socket.dev/blog/antv-packages-compromised"},{"type":"ARTICLE","url":"https://safedep.io/mini-shai-hulud-strikes-again-314-npm-packages-compromised/"},{"type":"ARTICLE","url":"https://opensourcemalware.com/blog/teampcp-compromises-npm-maintainer-with-over-540-packages"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-h97c-gr6h-22jm"}],"affected":[{"package":{"name":"@antv/g6","ecosystem":"npm","purl":"pkg:npm/%40antv%2Fg6"},"versions":["5.2.1","5.3.1"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@antv/g6/MAL-2026-3982.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"},{"name":"SafeDep","contact":["https://safedep.io"],"type":"FINDER"}]}