NewsIncident
A web page could make the OpenCode coding agent install and run an attacker's npm package
Datadog Security Labs disclosed on September 24 that a malicious web page could run code on a developer's machine through OpenCode's local server. The server that opencode serve and opencode web start on 127.0.0.1:4096 read the body of its upgrade endpoint as JSON without checking the content type, so an ordinary page could post a form to it, and the upgrade accepted a URL as the package to install, whose preinstall script then ran. It affected versions 1.14.30 through 1.18.21 installed through npm, pnpm or Bun and run without a password; 1.18.22, released on August 24, fixes it.
Why it matters
Local agent servers are reachable from every page your browser opens. Keep coding agents updated, and put a password on any local server they start.