MAL-2026-4147

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mcp-mermaid/MAL-2026-4147.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-4147
Published
2026-05-19T00:00:00Z
Modified
2026-05-19T18:02:24.827409786Z
Summary
Malicious code in mcp-mermaid (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.

This specific package (mcp-mermaid) was modified to include a malicious preinstall hook executing the obfuscated Bun payload.


-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (85c0a182d61fdb77ba2114f12ab9713ef304cf1390936043483a81e72ab07864)

The package mcp-mermaid was found to contain malicious code.

Source: google-open-source-security (847ef6b381d410bf176f7414a6f0fbbcf46a5f39b6d9011e126b279bd2d781df)

This package was compromised as part of the ongoing "Mini Shai-Hulud is back" worm by the TeamPCP threat actor.

The package will steal credentials and then propogate it to every package it has access to. The package also attempts to remain persistent.

Database specific
{
    "malicious-packages-origins": [
        {
            "sha256": "847ef6b381d410bf176f7414a6f0fbbcf46a5f39b6d9011e126b279bd2d781df",
            "import_time": "2026-05-19T05:55:55.089101Z",
            "modified_time": "2026-05-19T05:36:35Z",
            "versions": [
                "0.5.1",
                "0.6.1"
            ],
            "source": "google-open-source-security"
        },
        {
            "sha256": "85c0a182d61fdb77ba2114f12ab9713ef304cf1390936043483a81e72ab07864",
            "import_time": "2026-05-19T17:50:34.148796647Z",
            "modified_time": "2026-05-19T16:47:48Z",
            "versions": [
                "0.5.1",
                "0.6.1"
            ],
            "source": "amazon-inspector"
        }
    ]
}
References
Credits

Affected packages

npm / mcp-mermaid

Package

Affected ranges

Affected versions

0.*
0.5.1
0.6.1

Database specific

source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mcp-mermaid/MAL-2026-4147.json"