{"id":"MAL-2026-5539","summary":"Malicious code in mermaid-v11 (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (416d5c5ab1bc70076021520f20e67c3c52a81b74832379e19012fa2f6526c469)\nThe package impersonates the legitimate `mermaid` diagramming library (name `mermaid-v11`, bogus version `9999.0.2`, description 'Mermaid v11 diagramming library') and ships no library code — only a malicious `preinstall` lifecycle hook. On `npm install`, package.json line 6 runs `node -e` that reads `require('os').hostname()` and the OS username and beacons them out-of-band to an attacker-controlled Interactsh endpoint via two channels: an HTTPS GET to `https://d8l0dj5t5p5il86s3d3gepriqucsnn1nd.oast.me/?h=\u003chostname\u003e&u=\u003cusername\u003e&pkg=mermaid-v11`, and a DNS lookup of `mermaid-v11.\u003chostname\u003e.d8l0dj5t5p5il86s3d3gepriqucsnn1nd.oast.me` to leak the hostname through the resolver chain. The behavior fires automatically on default install with no user interaction, harvesting installer host identifiers for an attacker-controlled OAST listener.\n\n## Source: ghsa-malware (08e5fdefe3805b0f3e8caac9d44a8b8f95355b589742610913ba8ae5c357a498)\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: ossf-package-analysis (003edde2881c4b52d0a0ae821b81083c569fc8bf9ef236a216c82054e2cb3b4f)\nThe OpenSSF Package Analysis project identified 'mermaid-v11' @ 9999.0.2 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package communicates with a domain associated with malicious activity.\n","aliases":["GHSA-xmj9-vhj4-8q6c"],"modified":"2026-06-16T00:01:49.657832429Z","published":"2026-06-11T00:41:50Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-06-11T00:56:11Z","versions":["9999.0.2"],"source":"ossf-package-analysis","sha256":"003edde2881c4b52d0a0ae821b81083c569fc8bf9ef236a216c82054e2cb3b4f","import_time":"2026-06-11T01:21:48.587989408Z"},{"modified_time":"2026-06-11T00:41:50Z","versions":["9999.0.0"],"source":"ossf-package-analysis","sha256":"e09f1e6e06b756c14d4bf0c26e54a82093ee00a8b8190974088973cb664aada7","import_time":"2026-06-11T01:21:48.528302812Z"},{"source":"amazon-inspector","sha256":"334e4086eca8d2c76ec7ba03c6e47af121ed5ef043b0e4bf30db86248d064467","import_time":"2026-06-11T02:24:27.684217154Z","id":"IN-MAL-2026-005359","modified_time":"2026-06-11T01:46:53Z","versions":["9999.0.2"]},{"modified_time":"2026-06-11T01:46:52Z","versions":["9999.0.2"],"source":"amazon-inspector","sha256":"416d5c5ab1bc70076021520f20e67c3c52a81b74832379e19012fa2f6526c469","import_time":"2026-06-11T02:24:27.62799726Z","id":"IN-MAL-2026-005358"},{"id":"IN-MAL-2026-005360","modified_time":"2026-06-11T01:46:58Z","versions":["9999.0.1"],"source":"amazon-inspector","sha256":"5ef3e485f7b13c78c745d0e7165199eacb142cb62da22b44eaa51460474f10b9","import_time":"2026-06-11T02:24:27.762128916Z"},{"versions":["9999.0.0"],"source":"amazon-inspector","sha256":"c3188d09fdd69443609241a8e3baac0c120837170b801b7eaa7ad2c0f5b5808a","import_time":"2026-06-11T02:24:27.969639096Z","id":"IN-MAL-2026-005364","modified_time":"2026-06-11T01:48:16Z"},{"id":"IN-MAL-2026-005361","modified_time":"2026-06-11T01:46:58Z","versions":["9999.0.1"],"source":"amazon-inspector","sha256":"e00db32b40228301a09dc2a6245bca93536d909e4e8e5b8c1d207586337947df","import_time":"2026-06-11T02:24:27.80392393Z"},{"id":"IN-MAL-2026-005365","modified_time":"2026-06-11T01:48:16Z","versions":["9999.0.0"],"source":"amazon-inspector","sha256":"ed2c7d1b0095d1d538c4302304b30a940efd8cb6c0de4ae28e09f76ef7de6a25","import_time":"2026-06-11T02:24:28.026904512Z"},{"ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"source":"ghsa-malware","sha256":"08e5fdefe3805b0f3e8caac9d44a8b8f95355b589742610913ba8ae5c357a498","import_time":"2026-06-15T23:52:17.808442455Z","id":"GHSA-xmj9-vhj4-8q6c","modified_time":"2026-06-15T23:38:33Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/mermaid-v11/v/9999.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mermaid-v11/v/9999.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/mermaid-v11/v/9999.0.0"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-xmj9-vhj4-8q6c"}],"affected":[{"package":{"name":"mermaid-v11","ecosystem":"npm","purl":"pkg:npm/mermaid-v11"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["9999.0.2","9999.0.0","9999.0.1"],"database_specific":{"indicators":{"domains":["d8l0dj5t5p5il86s3d3gepriqucsnn1nd.oast.me","mermaid-v11.scan-2579d3f17b08.d8l0dj5t5p5il86s3d3gepriqucsnn1nd.oast.me"],"evidence_files":[{"tlsh":"b4f0d4fd0b10f6230ed90271429e720da5d2ea03754c9811c9e703ca47697f3bd75036","path":"package.json","sha256":"e4d3d429ed4dda6b54024546edbbc51916777528ad52c4b8504b74884c5bc82f"}],"package_integrity":[{"hashes":{"sha512_sri":"sha512-hxuwqfGRTWtEAl0buMUz4BmUZaIisJTmMu/SAS2gzV+oALV5LGfWD2escRKjfWaGkPQA3tNePgUWMq4IUwFddg==","sha1":"48b784b0037181a17d7ed2fe08f214a2006220eb"},"filename":"mermaid-v11-9999.0.2.tgz"}]},"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/mermaid-v11/MAL-2026-5539.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}