{"id":"GHSA-8x7w-vjr2-7q4m","revision":null,"records":[{"revision":"834f1b8384694d009b7eb9e10d5f9d98","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-6210","aliases":["GHSA-8x7w-vjr2-7q4m"],"title":"Malicious code in @apexcraft/nano-key (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (c46938b3634fb4de89ddf44b765e1c766c871a40fb31c54609c1b3526074e65c)\n@apexcraft/nano-key advertises itself as a 12-byte sortable ID generator (README and repository metadata are copied from yiwen-ai/xid-ts, an unrelated upstream project), but ships a 250KB obfuscator.io-style payload at dist/cjs/seed.cjs. package.json declares `\"postinstall\": \"node./dist/cjs/seed.cjs\"`, so the payload runs automatically on `npm install`. The same `runPrepare()` entry point is also invoked at module load: index.js line 25 calls `_seed.runPrepare()` inside `newState()`, which line 35 invokes as `defaultState = newState()` at top level — so any consumer that `require`s the package re-triggers the dropper. seed.cjs uses an RC4+base64 rotating string array decoder (`_0x554f` / `_0x1420`), control-flow flattening, a self-defending IIFE, and a debugger-protection loop to hide an AES-256-GCM-decrypted URL list. At runtime it `https.request`s those URLs, stages the response under `~/.cache` (or `%LOCALAPPDATA%` / `~/Library/Caches`), sha256-stamps the file, and executes it with `child_process.spawn(process.execPath, [file])`, with an alternate `bun` runtime branch. There is no signature or hash pinning of the fetched bytes, the destination is decrypted at runtime (mutable C2), and the package's stated purpose (ID generation) provides no legitimate reason to fetch and execute remote code. Installing or requiring this package hands arbitrary remote code execution to whoever controls the encrypted endpoint.\n\n## Source: ghsa-malware (a93a588a8c86cfaf399f05f0c68352ac421adb4cd95f3d9c4ec6d340595c6c5a)\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","state":0,"publishedAt":"2026-06-19T15:12:42+00:00","modifiedAt":"2026-07-07T14:01:46.0143654+00:00","affected":[{"ecosystem":"npm","name":"@apexcraft/nano-key","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":["1.3.8","1.3.4","1.3.6","1.2.5","1.3.2","1.3.5","1.3.7","1.2.4","1.3.3"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.8","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.4","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.6","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.2.5","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.2","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.5","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.7","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.2.4","https://www.npmjs.com/package/@apexcraft/nano-key/v/1.3.3","https://github.com/advisories/GHSA-8x7w-vjr2-7q4m"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-6210","license":"OSV · upstream source license applies","key":"osv:MAL-2026-6210","identifiers":["MAL-2026-6210","GHSA-8x7w-vjr2-7q4m"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-25T17:31:36.0404726+00:00","complete":true,"records":1796,"lastAttemptAt":"2026-11-25T17:31:36.0404726+00:00","lastSuccessAt":"2026-11-25T17:31:36.2369087+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:31:36.2369126+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8d356adab43082cb10bb7c033ed58312cf2ad2f0fb10e0afdf27fc89fa361f3b-26dcdb00d2602a44ce8d084c8b193b9d53ed55198d08552b702ea52d9dabcb8f","complete":true,"records":432275,"lastAttemptAt":"2026-11-25T17:28:48.5632303+00:00","lastSuccessAt":"2026-11-25T17:28:48.3656215+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:28:48.5632303+00:00","snapshotPublishedAt":"2026-11-25T17:22:33+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-1c5c8ba45c78490cb868d79f76dcac74","complete":false,"records":13939,"lastAttemptAt":"2026-11-25T17:36:18.3166487+00:00","lastSuccessAt":"2026-11-25T17:36:18.3980158+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:36:18.3980158+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-25T17:31:36.0404726+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-25T17:31:36.0404726+00:00","lastSuccessAt":"2026-11-25T17:31:36.237742+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:31:36.2377421+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-eb39311d8c62406daf6963e5b356a43d","complete":true,"records":13951,"lastAttemptAt":"2026-11-25T17:31:37.5709355+00:00","lastSuccessAt":"2026-11-25T17:31:37.566+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:31:37.566+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13987,"expectedIdentifiers":13987,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-70b1e3058f76fab20c77bb1c4924a4c57f7654dd208befb5b1f237e682d6ddca","complete":true,"records":10077,"lastAttemptAt":"2026-11-25T17:31:35.836173+00:00","lastSuccessAt":"2026-11-25T11:46:59.5507764+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:31:35.836173+00:00","snapshotPublishedAt":"2026-11-25T11:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-25T17:28:48.7684041+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:28:48.7684041+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-5be533520b83c9bfaebc80695093f6f0d59feafc2a1eab94e91dd79d1bb9241b","complete":true,"records":3222,"lastAttemptAt":"2026-11-25T17:31:35.9485524+00:00","lastSuccessAt":"2026-11-25T11:47:03.6026853+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:31:35.9485524+00:00","snapshotPublishedAt":"2026-11-25T11:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-194c9e8734ca87b27732e457bca8c4db9c43dc3302fed7bdd11fa02dc5746dfa","complete":true,"records":233135,"lastAttemptAt":"2026-11-25T17:31:35.6922922+00:00","lastSuccessAt":"2026-11-25T17:31:34.3905883+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:31:35.6922922+00:00","snapshotPublishedAt":"2026-11-25T16:33:25+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}