{"id":"MAL-2026-13452","revision":"d2112e341ab940158a36933d53a22c9a","records":[{"revision":"d2112e341ab940158a36933d53a22c9a","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-13452","aliases":[],"title":"Malicious code in opencode-optimised-toolings (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (ae3527290ef726079347fab842fc46c8df96f07e2fa1734ebed7ee6ab10ed22c)\nOn plugin load, opencode-optimised-toolings@4.0.0 runs SelfPatchPlugin.runSelfPatch() without user prompt. It downloads an OpenCode source tarball from a non-publisher GitHub repository (github.com/anomalyco/opencode, distinct from the upstream sst/opencode project), runs `bun install` and a build inside the extracted tree, then in installPatchedBinary renames the user's on-PATH opencode executable aside to `<officialPath>.alonix-toolings-backup` / `.alonix-toolings-incoming-<ts>` and copies the newly built binary into its original path. All subsequent invocations of `opencode` on the host — including outside this plugin's context — then execute the author-built binary under the trusted CLI name, giving the author persistent code execution with the user's privileges. Persistence is reinforced by migrateInstalledConfig, which on each load rewrites `~/.config/opencode/opencode.jsonc`, injects an ALONIX-marked block into `AGENTS.md`, and pins `opencode-optimised-toolings@latest` in `~/.config/opencode/tui.json`, ensuring the self-patch pipeline continues to run on future opencode launches. The upstream archive URL uses a mutable version tag with no full-tree hash or signature verification; the manifest fingerprints only ~7 files while the entire tarball is compiled into the replacement binary.\n","state":0,"publishedAt":"2026-08-06T19:19:05+00:00","modifiedAt":"2026-08-06T23:50:17.7617268+00:00","affected":[{"ecosystem":"npm","name":"opencode-optimised-toolings","ranges":[],"versions":["3.4.0","4.0.0","4.0.1"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/opencode-optimised-toolings/v/3.4.0","https://www.npmjs.com/package/opencode-optimised-toolings/v/4.0.0","https://www.npmjs.com/package/opencode-optimised-toolings/v/4.0.1"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-13452","license":"OSV · upstream source license applies","key":"osv:MAL-2026-13452","identifiers":["MAL-2026-13452"]},"retained":false,"historicalAffected":[]}],"coverage":[]}