{"id":"MAL-2026-3774","revision":null,"records":[{"revision":"ec39e2a0d6314b5cbe17c38b7d5e6296","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-3774","aliases":["GHSA-c22w-53x6-4jf5"],"title":"Malicious code in ts-build-optimize (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (51c637ab7c13ca2f592502f3444ebb24b291422b6388563d04fb8f7ae9030d5a)\nThe package masquerades as a TypeScript helper library (README is lifted from Microsoft's tslib and references --importHelpers, __extends, __assign, and a fake github.com/microsoft/ts-build-optimize/releases URL). The shipped index.js has nothing to do with TypeScript helpers: it exports a function `buildoptimize` whose default arguments are hardcoded to fetch `https://verceljs-kappa.vercel.app/icons/23` and pass the response body directly to `eval()` (index.js:61-63 sets `uuri = \"https://verceljs-kappa.vercel.app/icons/\"`; index.js:79 executes `eval(JSON.parse(b))`; the function is exported at index.js:95). Any consumer who imports this package and calls `buildoptimize()` — which the name and README imply is a build-time optimizer — will execute arbitrary attacker-controlled JavaScript on the installer/build machine. The Vercel destination is mutable (the author can swap the payload at any time), no hash or signature is verified, and the hosting domain is unrelated to Microsoft or any legitimate tslib publisher. The C2 endpoint serves a benign 6,758-byte PNG decoy when requested without the package's hardcoded `bearrtoken: logo` HTTP header (so casual scanners and `curl` see only an image), but returns 53,347 bytes of JSON-wrapped, heavily-obfuscated JavaScript when the header is present. Static analysis of the fetched second stage (sha256 of the raw response body fd082d2406d65aa78d5f1028e11dc23e85d63f07c459fb048d08236a65590b99; sha256 of the JSON-decoded JavaScript source 47d235dad37c7fb86e231822a4c231344cbd006e58b8cb9a013b064c1a521eb8 — captured 2026-05-15, payload is mutable) shows wallet-theft and persistence functionality: references to the Exodus cryptocurrency wallet on macOS (`/Library/Application Support/exodus.wallet`) and Windows (`/AppData/Roaming/Exodus/exodus.wallet`); functions named `installWindows`, `uninstallWindows`, `installMac`, `uninstallMac`, `isInstalledWindows`, and a `macPlistPath` constant indicating per-OS persistence install/uninstall machinery; heavy use of `child_process.execSync`/`exec` to invoke shell commands; and a top-level `setInterval(main, 30000)` re-execution loop. The combination of name-squat on a widely-used Microsoft package, README impersonation, header-gated decoy, and a remote-eval primitive that delivers wallet-theft + persistence makes this an unambiguous supply-chain attack.\n\n## Source: ghsa-malware (4be8b286c06dccd79ec8f318a8f88f497e65c271c7f3e33b11a7ca4d53646b4e)\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-14T19:25:02+00:00","modifiedAt":"2026-07-06T20:01:56.5178881+00:00","affected":[{"ecosystem":"npm","name":"ts-build-optimize","ranges":[],"versions":["1.1.5","1.1.6","1.2.2","1.2.0","1.2.1"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/ts-build-optimize/v/1.1.5","https://www.npmjs.com/package/ts-build-optimize/v/1.1.6","https://www.npmjs.com/package/ts-build-optimize/v/1.2.2","https://www.npmjs.com/package/ts-build-optimize/v/1.2.0","https://www.npmjs.com/package/ts-build-optimize/v/1.2.1","https://github.com/advisories/GHSA-c22w-53x6-4jf5"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-3774","license":"OSV · upstream source license applies","key":"osv:MAL-2026-3774","identifiers":["MAL-2026-3774","GHSA-c22w-53x6-4jf5"]},"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-829bbebdd0b34664b9e41f2f707049f8","complete":false,"records":13939,"lastAttemptAt":"2026-11-25T17:37:35.3917628+00:00","lastSuccessAt":"2026-11-25T17:37:35.6388348+00:00","error":null,"lastVerifiedAt":"2026-11-25T17:37:35.6388348+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}]}