{"id":"MAL-2026-4677","revision":null,"records":[{"revision":"6692c00e2c6846bfa7d99d6d43f36d7e","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-4677","aliases":["GHSA-7vv3-8cx6-w4g3"],"title":"Malicious code in swift-optimizer (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5c54f35da6df5cef65715d49fb7942aff442ee9a0cb486862031e5009277db3a)\nOn `npm install`, swift-optimizer@1.1.0 runs scripts/install-binary.js as a postinstall hook. The script is a hand-rolled JavaScript bytecode VM (~123 KB) with a base64-encoded constant pool that hides all install-time behavior — platform detection, network I/O, environment reads, file writes — from source-level scanners. Decoded behavior:\n\n1. Dropper: fetches a binary from https://telemetry021312.blob.core.windows.net/share/?v=<checksum> using a spoofed Edge User-Agent, writes it to bin/swift-optimizer-<arch>(.exe), and chmods 0755. The destination is anonymous Azure blob storage; the URL is unpinned and the bytes are not hash-verified. The destination domain has no relationship to the package's stated author/homepage. The package's main `Optimizer` API is wired to invoke this binary at runtime.\n\n2. Targeted-victim guardrail: getVersionChecksum reads process.env.USERDNSDOMAIN, USERDOMAIN, USERDOMAIN_ROAMINGPROFILE, os.hostname(), and an internal-IP lookup, SHA-256-hashes them, and only proceeds if the digest matches one of three hardcoded values (GUARDRAIL_DIGESTS = ['9aee64bc...','1e0ad8d7...','680326dc...']). This restricts execution to pre-identified victim organizations.\n\n3. Sandbox evasion: localTestenvCheck issues an HTTPS HEAD to the RFC1918 address https://10.100.135.17/ with rejectUnauthorized:false and inspects ECONNRESET/error signals to determine whether the host is on a real corporate LAN vs. an analyst sandbox; also checks process.env.CI.\n\n4. Anti-debug: process.hrtime.bigint() timing checks set a 'deception detected' flag if execution is slowed by a debugger.\n\n5. Cover-story metadata: package.json author 'Bob Smith' with throwaway GitHub URL bobsmith012545/swift-optimizer and homepage releases.swift-optimizer.io — placeholder publisher consistent with a single-purpose attack package.\n\nThe combination of an unpinned anonymous-host binary drop, victim-domain hash allowlisting, RFC1918 sandbox probing, anti-debug, and bespoke bytecode-VM obfuscation has no legitimate explanation. This is a targeted supply-chain dropper.\n\n## Source: ghsa-malware (b3b9f54ec0389f5b582a19d2d9b58c19ca92cb53792b1966da58b182d96ebf0e)\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-05-22T13:45:43+00:00","modifiedAt":"2026-08-26T01:14:23.6078388+00:00","affected":[{"ecosystem":"npm","name":"swift-optimizer","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":["1.1.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/swift-optimizer/v/1.1.0","https://github.com/advisories/GHSA-7vv3-8cx6-w4g3"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-4677","license":"OSV · upstream source license applies","key":"osv:MAL-2026-4677","identifiers":["MAL-2026-4677","GHSA-7vv3-8cx6-w4g3"]},"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-20T22:47:43.1952057+00:00","complete":true,"records":1790,"lastAttemptAt":"2026-11-20T22:47:43.1952057+00:00","lastSuccessAt":"2026-11-20T22:47:43.3752634+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:47:43.3752641+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-ab394367b327976f2e615091908e1dede6760751304792bb06c748f95767cbef-b5b29b8a5139718609527c2e3a0688681b40d1aec6bb070d2dab674b3a86cbe3","complete":true,"records":429990,"lastAttemptAt":"2026-11-20T22:46:01.4357208+00:00","lastSuccessAt":"2026-11-20T22:46:01.316838+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:46:01.4357208+00:00","snapshotPublishedAt":"2026-11-20T22:28:10+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-b786befad55242fb8fcf609d86431c70","complete":false,"records":13914,"lastAttemptAt":"2026-11-20T22:48:31.8111343+00:00","lastSuccessAt":"2026-11-20T22:48:31.805+00:00","error":"48 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-20T22:48:31.805+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13914,"expectedIdentifiers":13962,"failedIdentifiers":48},{"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-20T22:47:43.1952057+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-20T22:47:43.1952057+00:00","lastSuccessAt":"2026-11-20T22:47:43.3761054+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:47:43.3761056+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-88c9705a54a84196935b6d197f75e839","complete":false,"records":13926,"lastAttemptAt":"2026-11-20T22:48:22.8630662+00:00","lastSuccessAt":"2026-11-20T22:48:22.859+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:48:22.859+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13944,"expectedIdentifiers":13962,"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-a479762f093c173daaf94ab78c6e1c5dc2a2542cfb360d0428239181880c03b4","complete":true,"records":9988,"lastAttemptAt":"2026-11-20T22:47:43.0473566+00:00","lastSuccessAt":"2026-11-20T15:48:09.8429817+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:47:43.0473566+00:00","snapshotPublishedAt":"2026-11-20T15:18:25+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-20T22:46:01.495+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:46:01.495+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-0d57516b4a7264d7a3e50d41b832d65b6f43cdd6a79ce9e39aca7fd9f0df1b84","complete":true,"records":3208,"lastAttemptAt":"2026-11-20T22:47:43.1568332+00:00","lastSuccessAt":"2026-11-20T18:47:57.1855043+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:47:43.1568332+00:00","snapshotPublishedAt":"2026-11-20T17:03:30+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-71b6e9fa2bdef8930270791248008bdac2042cfaeb0c2f448f3abc7146bf0392","complete":true,"records":232844,"lastAttemptAt":"2026-11-20T22:47:42.9156518+00:00","lastSuccessAt":"2026-11-20T22:47:41.8304707+00:00","error":null,"lastVerifiedAt":"2026-11-20T22:47:42.9156518+00:00","snapshotPublishedAt":"2026-11-20T22:33:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}