MAL-2026-6421

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/leo-cli/MAL-2026-6421.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6421
Aliases
  • GHSA-hmx8-mh72-wj54
Published
2026-06-24T23:04:55Z
Modified
2026-06-25T16:16:23.698486400Z
Summary
Malicious code in leo-cli (npm)
Details

The leo-cli npm package was compromised as part of the Miasma worm campaign targeting the LeoPlatform npm ecosystem. On June 24, 2026, 20 LeoPlatform packages were published within a 3-second window by a threat actor who had taken over the npm account czirker belonging to the LeoPlatform organization.

The malicious payload is triggered automatically during npm install via a binding.gyp file using node-gyp command expansion (<!(node index.js > /dev/null 2>&1 && echo stub.c)), which bypasses lifecycle script scanners. The replaced index.js (~5.2 MB, obfuscated with ROT-N + AES-128-GCM encryption) deploys a multi-stage worm with the following capabilities:

  • Credential theft: Targets npm, GitHub, PyPI, RubyGems, Kubernetes, HashiCorp Vault, AWS (IAM keys, Secrets Manager, IMDS), 1Password, JFrog Artifactory, and SSH keys.
  • AI tool targeting: Exfiltrates configuration files for Claude, Cursor, Gemini, and VS Code.
  • Worm propagation: Enumerates npm packages and auto-publishes version bumps to spread to other maintainers in the ecosystem.
  • GitHub persistence: Creates orphan snapshot-<hex> branches with fake "Dependabot Updates" workflows to maintain access after initial compromise.

Any system that installed this version should be considered fully compromised. Rotate all secrets immediately from a separate, clean machine. See the linked SafeDep report for full payload analysis, indicators of compromise, and remediation guidance.


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

Source: amazon-inspector (520c95e9cea55807cedb7f42a819fdb63febb61fe9a392b3de8f31f129cfa0fc)

The package ships a binding.gyp file containing GYP command-expansion syntax (<!(...)) in its target configuration. npm implicitly invokes node-gyp rebuild whenever a binding.gyp is present — even without an explicit install/postinstall script — and node-gyp evaluates <!(...) expressions as shell commands during the configure step. This causes arbitrary shell execution on the installer's machine on npm install, functionally equivalent to a lifecycle hook. Additional files (docker/run.js, docker-run.js, lib/build.js, lib/defaultCronRunner.js) combine child_process and outbound HTTP usage, broadening the install/runtime risk surface, though the binding.gyp command-expansion alone is sufficient grounds for installer-side concern.

Source: ghsa-malware (82a72f819ea5b4241899147f88c47738911bf67d22a3b574c998fd5c5a595a5e)

Any 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.

Database specific
{
    "iocs": {
        "urls": [
            "https://safedep.io/miasma-worm-hits-leoplatform-20-npm-packages/"
        ]
    },
    "malicious-packages-origins": [
        {
            "sha256": "520c95e9cea55807cedb7f42a819fdb63febb61fe9a392b3de8f31f129cfa0fc",
            "import_time": "2026-06-25T07:47:50.441351689Z",
            "source": "amazon-inspector",
            "modified_time": "2026-06-25T06:30:26Z",
            "versions": [
                "3.0.3"
            ],
            "id": "IN-MAL-2026-007465"
        },
        {
            "sha256": "82a72f819ea5b4241899147f88c47738911bf67d22a3b574c998fd5c5a595a5e",
            "import_time": "2026-06-25T16:08:55.41489543Z",
            "source": "ghsa-malware",
            "modified_time": "2026-06-25T15:24:16Z",
            "versions": [
                "3.0.3"
            ],
            "id": "GHSA-hmx8-mh72-wj54"
        }
    ]
}
References
Credits

Affected packages

npm / leo-cli

Package

Affected ranges

Affected versions

3.*
3.0.3

Database specific

source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/leo-cli/MAL-2026-6421.json"
cwes
[
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    },
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]
indicators
{
    "evidence_files": [
        {
            "sha256": "32d1bc728d8e504952083a6adc488c309a401c7df4dc8f47b382ce32e4aebe21",
            "tlsh": "48c08c3ca9380d1029d958285168d402a4b142a3494e2a81fade60284fa840b2898bad",
            "path": "binding.gyp"
        },
        {
            "tlsh": "b0d1a64df79e38be82c93311803d401aedbcdb71075410bcb159fa662694e2843e2fab",
            "sha256": "f02a70a68b5b926c925979ff5999a0df772d992d75e6a6aa44b4c3c59a01d794",
            "path": "docker/run.js"
        },
        {
            "tlsh": "5fc1a98df75f38be82c53311d03e401aed7cdb71065411bcb15dfb5225a8e2953a2e9a",
            "sha256": "34e1780bebd407c5891c601ae6a041c11a8e7553de9c7037bfdef100f4e4668b",
            "path": "docker-run.js"
        },
        {
            "sha256": "14e14652d4928032436c98ac3d0a1809fde2c375fc29d459c323467b537f8703",
            "tlsh": "c6c2d6d2b7cd76af4bc0bb85d038400ace6ccaf34551017ebadcb5dc149a95853a9ab8",
            "path": "lib/build.js"
        },
        {
            "tlsh": "ac1298dd739e36af4bd4674ad0378008beaee2b31a1440fdf54ca754249c62913d9bb4",
            "sha256": "e36fd16de3254fb11556cdeacfc87f22191acd883faf69290b179a6f2581a5ff",
            "path": "lib/defaultCronRunner.js"
        }
    ],
    "package_integrity": [
        {
            "filename": "leo-cli-3.0.3.tgz",
            "hashes": {
                "sha1": "92221eb202e9f2ac577e5c33658c8a05c6d67556",
                "sha512_sri": "sha512-Y7xDzguXR3xMLdQjvomf14kmXOquRYhD3sPa1K9OkolTlBkw2ch/lV0bXgNvBmxk88polXp+GcwBXgNwl1zdCA=="
            }
        }
    ]
}