MAL-2026-6417

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/leo-auth/MAL-2026-6417.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6417
Aliases
  • GHSA-x8r4-xjr9-2hhm
Published
2026-06-24T23:04:55Z
Modified
2026-06-25T16:16:23.809152812Z
Summary
Malicious code in leo-auth (npm)
Details

The leo-auth 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 (6fb699267ee396f96887aa6ab8538a62ecb0d2c0401aac12942b345bbe149928)

The package ships a binding.gyp file containing GYP command-expansion syntax (node-gyp rebuild whenever a binding.gyp is present (no declared install/postinstall script is required), and the GYP configure step evaluates command-expansion expressions as shell commands. This means installing the package automatically executes the embedded command on the installer's machine before any user code runs. The package is named as an authentication helper and does not ship a real native addon source tree consistent with a legitimate build, so the only purpose of the binding.gyp file is to run the embedded shell command at install time. This is the structural fingerprint of install-time remote code execution via build-config command substitution.

Source: ghsa-malware (7000a07a785f457feaee940423297a2a22e8c23df9b46fe0c5a9c10100e49a80)

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": "6fb699267ee396f96887aa6ab8538a62ecb0d2c0401aac12942b345bbe149928",
            "id": "IN-MAL-2026-007466",
            "source": "amazon-inspector",
            "modified_time": "2026-06-25T06:30:27Z",
            "versions": [
                "4.0.6"
            ],
            "import_time": "2026-06-25T07:47:50.485143925Z"
        },
        {
            "sha256": "7000a07a785f457feaee940423297a2a22e8c23df9b46fe0c5a9c10100e49a80",
            "import_time": "2026-06-25T16:08:55.426588993Z",
            "source": "ghsa-malware",
            "modified_time": "2026-06-25T15:26:17Z",
            "versions": [
                "4.0.6"
            ],
            "id": "GHSA-x8r4-xjr9-2hhm"
        }
    ]
}
References
Credits

Affected packages

npm / leo-auth

Package

Affected ranges

Affected versions

4.*
4.0.6

Database specific

source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/leo-auth/MAL-2026-6417.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"
        }
    ],
    "package_integrity": [
        {
            "filename": "leo-auth-4.0.6.tgz",
            "hashes": {
                "sha1": "809ce3680adfdb8f0746189b68b6b5a6888a960f",
                "sha512_sri": "sha512-/3Kcoqj5uDvvJAK7I3SD1cgFdHoJYzYu2ps0pRGJcFRgtRzjS0S0ROctKCNUdDWDsDSyClYrKF7G39ljuMKxqQ=="
            }
        }
    ]
}