The leo-logger 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:
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.=-
The package's binding.gyp contains GYP command-expansion syntax (<!(...) / <!@(...)) at line 6 inside a sources/targets field. npm implicitly runs node-gyp rebuild whenever a binding.gyp is present — even with no declared install/postinstall script — and GYP evaluates these expressions as shell commands during the configure step. This causes the embedded command to execute on every npm install of this package, functionally equivalent to a malicious lifecycle hook. The package presents itself as a 'logger' but ships no native C/C++ source that would justify a node-gyp build configuration, so the binding.gyp's only effective purpose is to trigger command execution at install time.
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.
{
"iocs": {
"urls": [
"https://safedep.io/miasma-worm-hits-leoplatform-20-npm-packages/"
]
},
"malicious-packages-origins": [
{
"import_time": "2026-06-25T07:47:51.004099571Z",
"source": "amazon-inspector",
"sha256": "b98872e21922ce7f9c334cab2e829035050df2964019c2879a9646710afc501f",
"versions": [
"1.0.8"
],
"id": "IN-MAL-2026-007477",
"modified_time": "2026-06-25T06:30:37Z"
},
{
"import_time": "2026-06-25T11:11:49.112771421Z",
"modified_time": "2026-06-25T09:54:36Z",
"sha256": "db226679b9e2a336ea738ecd2a4f64e4246123ecbce9ce1bd1d54a44b7a9f24e",
"versions": [
"1.0.8"
],
"id": "GHSA-5ggh-qwv4-wpwg",
"source": "ghsa-malware"
}
]
}{
"evidence_files": [
{
"tlsh": "48c08c3ca9380d1029d958285168d402a4b142a3494e2a81fade60284fa840b2898bad",
"sha256": "32d1bc728d8e504952083a6adc488c309a401c7df4dc8f47b382ce32e4aebe21",
"path": "binding.gyp"
}
],
"package_integrity": [
{
"filename": "leo-logger-1.0.8.tgz",
"hashes": {
"sha1": "24a0d9e496ec07ca978fab602d5f5e0b39fa03a0",
"sha512_sri": "sha512-bU1nn+XpD2jU59t8HapcohZTHwFwaIYKcavIEu02cVINI0w5vL/milcJ4jIfNpwU5ERkdKbX2uELoEBEoyetxQ=="
}
}
]
}
[
{
"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",
"name": "Embedded Malicious Code",
"description": "The product contains code that appears to be malicious in nature."
}
]
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/leo-logger/MAL-2026-6429.json"