OpenCode security incidents and advisories

OpenCode has two published advisories: an unauthenticated local server flaw fixed in 1.0.216 and a cross-site upgrade flaw fixed in 1.18.22. Approval depends on running a patched build and on controls the project says it does not provide.

On this page

Are OpenCode security advisories fixed, and which versions must you run?

Both published OpenCode advisories have fixed releases. The local server flaw, GHSA-vxw4-wv6m-9hhh (CVE-2026-22812), is patched in opencode-ai 1.0.216, and every earlier version is listed as affected. The cross-site upgrade flaw, GHSA-632h-h47v-g4x4, affects opencode-ai 1.14.30 and later and is patched in 1.18.22. The fixes ship in the open-source package, not in a plan, so an Enterprise or Go subscription does not change whether a given install is exposed. Confirm the installed version on every machine before approval, and treat a build older than the patched release for its branch as unapproved.

Checking the version is harder than it sounds because OpenCode can be installed through a curl script, npm, bun, pnpm, yarn, Homebrew, Arch Linux packages, mise, Nix, or the beta desktop app for macOS, Windows and Linux. Each channel can lag behind the others, so inventory the installed binary and its package manager record rather than assuming a recent install is current. Where the affected range is open-ended, as with the 1.14.30 starting point of the second advisory, a version check must confirm the build is at or above the patched release, not merely that it is newer than the flaw's start.

A patched build does not make the tool safe to run without other controls. The project's own SECURITY.md states that OpenCode does not sandbox the agent and that permission prompts are not a security boundary, so both advisories should be read as fixes to specific defects, not as evidence of isolation. Ask your security team to confirm the current advisory list on the OpenCode security advisories page before each rollout, and to plan separate controls, such as OS-level isolation and restricted network access, for the agent's own actions.

Which OpenCode versions are affected and fixed

This table compares each published OpenCode advisory by identifier, flaw type, publication date, CVSS score, affected range, patched version and attacker capability. Read the affected range first, then confirm the installed version against the fixed release. The main takeaway is that the two advisories affect different version ranges, so a single upgrade target does not cover both.

AdvisoryFlaw and affected versionsFixed version and attacker capability
GHSA-vxw4-wv6m-9hhh (CVE-2026-22812)Unauthenticated local HTTP server with permissive CORS. Published January 12, 2026 with CVSS 8.8. Affects opencode-ai versions below 1.0.216.Patched in 1.0.216. Local processes or websites could run shell commands as the user.
GHSA-632h-h47v-g4x4Cross-site request to the opencode serve /global/upgrade endpoint. Published September 24, 2026 with CVSS 7.5. Affects opencode-ai 1.14.30 and later.Patched in 1.18.22. A webpage could install an attacker-controlled npm package and run its lifecycle scripts.
Edition applicabilityNeither advisory is tied to a paid plan. The Enterprise, Go and Console editions are not a factor in the affected ranges.Confirm the installed version on every machine, whichever plan or install method was used.

What the two advisories say happened

The first advisory, GHSA-vxw4-wv6m-9hhh (CVE-2026-22812), concerns the HTTP server that OpenCode starts automatically. According to the advisory, that server had no authentication and permissive CORS settings. The practical result is that any other local process on the machine, or any website a user opens in a browser, could send requests to it and run shell commands as that user. The advisory was published January 12, 2026 with a CVSS score of 8.8. It lists opencode-ai versions below 1.0.216 as affected and 1.0.216 as patched. Any copy older than 1.0.216 should be treated as exposed to local and browser-originated command execution until it is replaced.

The second advisory, GHSA-632h-h47v-g4x4, describes a cross-site request flaw in opencode serve. A webpage could send a request to the /global/upgrade endpoint, which would install an attacker-controlled npm package and run its lifecycle scripts. The advisory was published September 24, 2026 with a CVSS score of 7.5. It lists opencode-ai 1.14.30 and later as affected and 1.18.22 as patched, so versions from 1.14.30 up to but not including 1.18.22 are in scope. The supplied advisory data does not include a CVE identifier for this flaw. Confirm with the GitHub advisory record whether a CVE was assigned before your vulnerability register or change records cite one.

Both flaws share a pattern: a local server reachable from a browser session. Before approval, ask your engineering team to inventory every installed OpenCode version across laptops, build agents and shared hosts, and to check whether opencode serve runs on any of them. Record the installed version against the patched versions above. Because the advisories describe the server rather than the agent's permission prompts, a permission setting alone does not close either gap; the fix is to run a patched release and confirm that the server is not exposed to other local users or to web content.

How a malicious webpage reaches the local OpenCode server

The diagram starts in a staff member's browser, which loads an attacker's page while OpenCode server mode is running on the same workstation. The page sends a cross-site request to the local opencode serve process, calling the /global/upgrade endpoint that the advisory describes. The server then installs an attacker-controlled npm package, and its lifecycle scripts run as the logged-in user. Check whether server mode is enabled on managed devices and which OpenCode versions are installed.

Simplified illustration based on the published advisory text, not a tested exploit.

Which OpenCode controls limit these flaws and which do not

Each advisory was fixed in a specific release, and the server and permission behaviors behind them sit on the workstation itself. The controls below reduce exposure in different ways, and none of them is a sandbox, so the reviewer should map each one to the failure it can and cannot stop.

Pin to patched versions

Version pinning is the only control that removes the known flaws. The advisory for CVE-2026-22812 lists versions below 1.0.216 as affected and 1.0.216 as patched, while GHSA-632h-h47v-g4x4 lists 1.14.30 and later as affected and 1.18.22 as patched. A pin does not cover versions installed through other channels, such as an npm global install that predates the fix. Ask for an inventory of every installed binary and desktop build, and confirm which release each one reports.

CVE-2026-22812 advisory

Server mode enablement and listener scope

Both advisories depend on the local HTTP server, which the CVE-2026-22812 advisory describes as started automatically and without authentication. Confirm in current release notes and configuration whether the server starts by default, and whether opencode serve can be disabled or bound only to loopback. Binding to loopback does not stop a website in the user's browser from reaching the port, so this control reduces exposure but does not close the cross-site path in GHSA-632h-h47v-g4x4.

Managed settings for version and tools

Managed configuration can standardize settings across staff machines, and the Enterprise page describes policies as part of the plan. Confirm whether managed settings can pin or block a release, prevent auto-upgrade, and restrict providers, MCP servers and specific tool calls. Managed settings that govern tools do not make the agent safe to run on a host, and an admin cannot rely on them to stop a local process from calling the server.

OpenCode Enterprise

Permission rules are not a boundary

The project's SECURITY.md states that OpenCode does not sandbox the agent and that permission prompts are not a security boundary. Allow, ask and deny rules therefore govern what the agent asks to do, not what a browser tab or another local process can send to the server. Permission rules should be treated as a usability and policy layer, and any review should assume that a rule set does not prevent either advisory.

OpenCode SECURITY.md

Workstation network controls

Endpoint firewalls and egress filtering can limit which hosts a workstation reaches and which packages it downloads. The cross-site upgrade flaw installs an npm package and runs its lifecycle scripts, so restricting package sources to an approved registry may reduce the impact of a malicious package. These controls do not stop a browser on the same machine from sending a request to a local port, so confirm whether the endpoint tool can filter loopback traffic from browsers.

How exposure changes by install method and workstation setup

OpenCode can reach a workstation through the curl install script, npm, bun, pnpm or yarn, Homebrew, Arch Linux packages, mise or Nix. Each channel updates on its own schedule, so two machines that were installed on the same day can run different builds. The advisories in this topic name opencode-ai versions as affected, which means the version string on each machine is the thing to verify, not the install channel or the date of the original install.

  • Version varies by channel: A Homebrew, Nix or Arch package may lag or lead the npm release, so confirm the version reported by the installed binary on every machine.
  • Stale global installs: An npm or bun global install can persist after a project-level update, so check which binary is first on the path for each user.
  • Version pinning: Pinned Nix flakes, mise configurations or lockfiles can hold an older build for months, so review pins as part of the inventory.
  • Server state after upgrade: Confirm whether a local server process is listening after the agent starts, since the advisories concern the server mode.
  • Recorded inventory: Keep the version, channel and owner of each install in an asset list that the security team can query.

Check the installed version against the affected and patched ranges in the GHSA-vxw4-wv6m-9hhh advisory and the GHSA-632h-h47v-g4x4 advisory for every channel, not only the one the team prefers.

What to verify before OpenCode is approved for staff

This sequence turns the two published advisories into an approval baseline: a minimum version, a known install footprint, a decision on server mode, and a record tied to a specific version. Each step ends with evidence the security team can file and reuse at the next review.

  1. Confirm the minimum acceptable version

    The security lead reads both advisories and sets the floor for approval. GHSA-vxw4-wv6m-9hhh (CVE-2026-22812) lists opencode-ai versions below 1.0.216 as affected and 1.0.216 as patched. GHSA-632h-h47v-g4x4 lists opencode-ai 1.14.30 and later as affected and 1.18.22 as patched, so a version between 1.14.30 and 1.18.21 is still exposed to the second flaw. Confirm that the approved floor is at or above 1.18.22 and that the reviewer has checked the wording of both advisories against the version range. The output is a written minimum version with the reasoning for each advisory.

  2. Inventory installed versions across install methods

    The endpoint or platform team lists every machine that runs OpenCode, including the curl install script, npm, bun, pnpm or yarn, Homebrew, Arch Linux packages, mise, Nix and the beta desktop app on macOS, Windows and Linux. Each install method can update on its own schedule, so a single package manager query is not enough. Record the host, user, install method and reported version for each entry, and flag anything below the approved floor. The output is a dated inventory that shows which machines are compliant and which need action before use.

  3. Decide whether server mode is permitted and where

    The security team decides whether staff may run OpenCode's serve mode, the mode behind both advisories, and on which hosts. The first advisory describes an automatically started HTTP server without authentication and with permissive CORS, and the second describes a cross-site request to the serve endpoint for upgrades. Document whether server mode is allowed on developer laptops, shared hosts or nowhere, and confirm the rule with the team that operates those hosts. The output is a signed server mode policy listing permitted hosts and the reason for each.

  4. Set a process for applying new releases

    The platform owner defines who checks for new OpenCode releases, who tests them, and who pushes them to each install method. Because the project's own SECURITY.md states that OpenCode does not sandbox the agent and that permission prompts are not a security boundary, the approval should not rely on the tool's prompts to contain a bad release. Agree on how quickly a release that fixes a published advisory must reach staff machines and who signs off the exception if it cannot. The output is a written update procedure with named owners and a record of the last release applied.

  5. Subscribe to the repository advisory feed

    The security team subscribes to security advisories for the anomalyco/opencode repository through GitHub so that new advisories reach the same queue as other vulnerability notices. The team should also confirm the reporting channel in the project's SECURITY.md, which routes vulnerability reports through the GitHub security advisory tab and states that AI-generated security reports are not accepted. Keep a note of who receives the notifications and how they are triaged against the approved inventory. The output is a confirmed subscription and a triage owner recorded in the approval file.

  6. Record the approval with the version it covers

    The approver writes the decision down with the exact version range it covers, the install methods in scope, the server mode rule, the inventory date and the advisories reviewed by identifier. Approval should lapse or be re-reviewed when a new advisory is published or when the version in use moves outside the approved range. The output is a dated approval record that a reviewer can match against the inventory and the advisory feed at any later audit.

What a security reviewer asks to see for OpenCode advisories

This table lists the evidence a reviewer should request before approving OpenCode, tied to the two published advisories and the project's reporting rules. Use it as a checklist: each row names the request, why it matters, and the source that supports it. The main takeaway is that approval depends on proving which installed version runs everywhere, not on the advisory list alone.

Evidence requestWhy the reviewer asksWhere it comes from
Advisory list with fixed versionsCVE-2026-22812 affected opencode-ai versions below 1.0.216, fixed in 1.0.216. GHSA-632h-h47v-g4x4 affected 1.14.30 and later, fixed in 1.18.22.GHSA-vxw4-wv6m-9hhh and GHSA-632h-h47v-g4x4
Installed version inventoryShows whether any machine falls in an affected range, including versions below 1.0.216 and from 1.14.30 up to the patched 1.18.22 release.Endpoint management or package manager records, checked against the advisory ranges
Record of each workstation's versionEach advisory is version-specific, so a single fleet-wide statement is not enough. Ask for the version on every machine, including desktop and CLI installs.Internal asset inventory, confirmed on each device
Decision on server modeBoth advisories concern the local HTTP server started by opencode serve or automatically at launch. The reviewer needs a documented decision on whether that server may run.Internal approval record, reviewed against the advisory descriptions
Vendor reporting processShows how the team learns of and reports new flaws, and how long the vendor takes to acknowledge a report.OpenCode SECURITY.md: reports go through the GitHub Report a Vulnerability tab. Without acknowledgement within 6 business days, the reporter may escalate by email.
Policy on AI-generated security reportsAffects how internal staff or testers may submit findings, since the project does not accept AI-generated security reports.OpenCode SECURITY.md
Patch and monitoring ownerNames who watches for new advisories and who approves upgrades when a fix ships.Internal change records, with the GitHub advisory page as the monitoring source

Gaps that remain after patching

Installing 1.18.22 or 1.0.216 closes the two published advisories, but it does not change how OpenCode is designed. The project states that it does not sandbox the agent and that permission prompts are not a security boundary, so the controls around the tool remain the organization's responsibility.

No sandbox for the agent

The OpenCode SECURITY.md states that the project does not sandbox the agent. Whatever the agent can read or run on a machine, it can do with the signed-in user's permissions, and a patched version does not change that. Before approval, confirm which files, credentials and network paths the agent can reach on each workstation. A common approach is to run the agent in an isolated environment the organization manages, such as a container or disposable virtual machine with limited mounts and egress, and to keep production credentials out of it.

OpenCode SECURITY.md

Permission prompts are not a boundary

The project also states that permission prompts are not a security boundary. A prompt helps a user notice an action, but it is not an enforced control, and users can approve commands they do not fully read. Treat allow and ask rules as convenience features rather than as the line that protects secrets. Where a control must hold, the organization needs enforcement outside the agent, such as host-level restrictions, network policy and credential scoping that the agent process cannot change.

No committed patch timeline

The supplied sources show a six business day window for acknowledging a report, after which a reporter may escalate by email. They do not show a vendor commitment to how quickly fixes ship after disclosure. Ask the vendor for its patch and disclosure expectations in writing, and plan for a gap between a public advisory and your rollout. Until a fix is deployed, restrict or pause server mode on affected hosts and track the advisory page directly.

Acknowledgement window
6 business days

Verify the fixed version everywhere

Each advisory names a patched release, and a fix only protects machines that actually run it. Installations come from several routes, including the curl script, npm, Homebrew, Nix and the beta desktop app, so the installed version can differ across a fleet. Inventory every install, compare each one against the patched version in the advisory, and recheck after updates. Remember that the patched version of the second advisory is later than the first, so a machine that passed the first check may still be exposed to the second.

GHSA-632h-h47v-g4x4 advisory

Questions buyers ask about OpenCode advisories before approval

Does the OpenCode Enterprise plan include security fixes?

The security fixes for the open-source package ship with the package itself, so a fix published in an advisory is available to any install that is upgraded to the patched version. Whether an Enterprise contract adds anything beyond that, such as support response commitments or named upgrade assistance, is a commercial term that is not settled by the public documentation. Ask the vendor to confirm in writing which plan terms cover security updates, response times and the versions it will support, and attach that answer to the approval record. Ask for the same confirmation for any Go or Console subscription you consider, since those cover model access rather than the local tool.

How fast does the OpenCode project respond to a reported vulnerability?

The project's SECURITY.md says a reporter who gets no acknowledgement within 6 business days may escalate by email. That describes the reporter's path, not a committed fix time, so it should not be read as a service level for your organization. Vulnerabilities are reported through the GitHub security advisory Report a Vulnerability tab, and the published advisories show the time from disclosure to patched version. Your own exposure window depends on how quickly your team inventories installs and upgrades them, which you control. Record both the vendor's stated acknowledgement path and your internal patch deadline in the approval file.

Can our own team patch OpenCode without a vendor?

Yes, for the open-source package, your team can upgrade installs without involving the project or a commercial partner, because the software is MIT licensed and distributed through several install paths. The work that makes this reliable is an inventory of every machine and server where OpenCode runs, the installed version on each, and a named owner who receives advisories. Build an update process that covers curl, npm, bun, pnpm, yarn, Homebrew, Arch Linux packages, mise, Nix and the desktop app, because each path updates differently. Confirm the minimum patched version for each advisory before you declare a machine compliant.

What drives the cost of an outside security review of OpenCode?

An outside review is priced from a written scope, so the main cost drivers are the parts of the tool you ask a reviewer to examine. The number of install paths matters, since each one can carry a different version and a different update mechanism. Server mode matters more, because the two published advisories both involved the opencode serve HTTP server and its upgrade endpoint, so testing that surface takes more time than a review of the terminal client alone. The evidence you need for approval, such as version evidence, configuration review or a written test report, also changes the effort. DeployOpen fixed-scope engagements are quoted from the agreed scope, and the quote should list each of these items separately.

What does our organization need to provide for an OpenCode security assessment?

An assessment needs an accurate picture of where OpenCode runs, so the core inputs are read access to an inventory of workstations and servers, the installed versions, the install method on each, and any use of opencode serve. You also need a named approval owner who can accept findings and decide on restrictions, and a copy of the current workstation policy, including any managed settings or MDM profiles that already restrict the tool. Provide the vendor's security policy document and the list of advisories you already track so the review starts from known facts. Confirm in the scope which environments may be tested and who signs off on any test that touches live systems.

Does OpenCode accept AI-generated vulnerability reports?

No. The project's SECURITY.md states that AI-generated security reports are not accepted. If your security team or a contracted tester uses AI tools to find issues, the human reviewer must verify each finding before it is reported, and the report should be submitted through the GitHub security advisory Report a Vulnerability tab. This matters for your own testing policy as well, because a finding you intend to share with the project must meet the project's reporting rules. Add this requirement to any scope document that involves reporting OpenCode issues to the vendor.

How DeployOpen helps test and govern an OpenCode rollout

DeployOpen plans, implements and tests self-hosted open-source platforms inside the client's own infrastructure, and runs security testing that includes AI systems and agents. For an OpenCode rollout, we approach advisories as a control question: which versions are running, which exposure paths they open, and what the team must verify before approval.

How we scope

  • Inventory every OpenCode install point, including npm, Homebrew, curl and desktop builds, and record the exact versions in use.
  • Map whether opencode serve or any automatically started server runs on developer machines or shared hosts.
  • Agree in writing which advisories, versions and environments the engagement covers before any work starts.
  • Engagements are fixed-scope, with deliverables and timelines confirmed in writing; ongoing support is available as a retainer.

How we build

  • Test the local server for unauthenticated access and permissive cross-origin requests from a browser on a managed workstation.
  • Check that the /global/upgrade path cannot be reached by a cross-site request and that package installs require explicit approval.
  • Verify that upgraded builds sit at or above the patched versions named in each advisory before rollout.
  • Run AI agent security testing covering prompt injection and commands the agent can trigger without a sandbox.

How we hand over

  • Deliver a written test report listing each advisory, the tested version, the result and the evidence captured.
  • Document the version baseline, upgrade steps and the network and browser controls that were confirmed in your environment.
  • Provide a control summary your security and compliance reviewers can file with the approval record, without claiming any audit outcome.
  • Walk the engineering and security owners through the findings so they can repeat the checks after each release.

How we support

  • Track new OpenCode advisories and release notes against the versions in your environment under a retainer.
  • Re-run targeted tests after upgrades, configuration changes or new install methods reach developer machines.
  • Confirm with your own team how advisories are monitored and who approves a version change before a retainer starts.
  • Schedule continuous testing of the agent and its integrations as the rollout expands to more teams.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.