{"id":"MAL-2026-13462","revision":"9f1679cd85fc4d309522c21cd8c73ac7","records":[{"revision":"9f1679cd85fc4d309522c21cd8c73ac7","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-13462","aliases":[],"title":"Malicious code in trimprompt (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (202ef6d02c8fa917e9515b448972c19a209007f858b17d236a74857f3fe4febb)\nThe package `trimprompt@1.0.47` ships a large set of heavily obfuscated JavaScript modules (hex-mangled identifiers `_0x...` across cache-manager.js, cache.js, ccr.js, dashboard.js, executor.js, file-watcher.js, hooks/claude-hook.js, mcp.js, proxy-conv.js, proxy-resp.js, redactor.js, seed.js, simulate.js, sync.js, tracker.js, and all filters/*.js) whose original structure and destinations are deliberately hidden. Two of these obfuscated files (sync.js and tracker.js) additionally combine `require('child_process')` with HTTP `POST` calls carrying host/identifier fields — the shape of host-reconnaissance and outbound reporting to a remote endpoint. A `postinstall.js` script auto-executes on `npm install` and spawns PowerShell (`spawn('powershell',...)`), and `shims.js` also invokes `child_process` and runs `execSync('pwsh...')`, providing an install-time and load-time execution surface on Windows hosts. The combination of pervasive identifier-level obfuscation across nearly every module, a PowerShell-spawning postinstall lifecycle hook, and obfuscated modules that pair child_process with HTTP POST of host identifiers is inconsistent with a legitimate prompt-trimming utility and matches the shape of an install-time execution + host-beaconing supply-chain payload. Concrete destination hostnames/URLs are hidden behind the string-array obfuscation and are not recoverable from identifier evidence alone.\n","state":0,"publishedAt":"2026-08-06T19:41:53+00:00","modifiedAt":"2026-08-06T23:50:23.3902618+00:00","affected":[{"ecosystem":"npm","name":"trimprompt","ranges":[],"versions":["1.0.47","1.0.35","1.0.49","1.0.46","1.0.42","1.0.48"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/trimprompt/v/1.0.47","https://www.npmjs.com/package/trimprompt/v/1.0.35","https://www.npmjs.com/package/trimprompt/v/1.0.49","https://www.npmjs.com/package/trimprompt/v/1.0.46","https://www.npmjs.com/package/trimprompt/v/1.0.42","https://www.npmjs.com/package/trimprompt/v/1.0.48"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-13462","license":"OSV · upstream source license applies","key":"osv:MAL-2026-13462","identifiers":["MAL-2026-13462"]},"retained":false,"historicalAffected":[]}],"coverage":[]}