opencode-optimised-toolings (npm) · Malicious Code
Affects opencode-optimised-toolingsSource GCVE Database
Malicious package : remove opencode-optimised-toolings and rotate any secrets on hosts that installed it.
Data as of 7 Aug 2026, 07:32 UTC
Malicious package
Published to npm · OSV MAL-2026-13452
What to do
Remove opencode-optimised-toolings from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmopencode-optimised-toolings | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package opencode-optimised-toolings versions 3.4.0, 4.0.0, and 4.0.1 contains malicious code that performs a self-patching operation without user consent. It downloads a source tarball from a non-official GitHub repository, builds a replacement binary, and replaces the legitimate opencode executable on the user's system. This replacement binary runs under the trusted CLI name, allowing persistent code execution with the user's privileges. The package also modifies user configuration files to ensure the malicious behavior persists across future launches.