{
 "public_id": "AIR-2026-0264",
 "incident_id": "2026-09-opencode-global-upgrade-rce",
 "date_disclosed": "2026-09-24",
 "date_occurred": null,
 "title": "OpenCode: malicious webpage can execute commands on a developer's machine via the /global/upgrade endpoint",
 "class": "responsible_disclosure",
 "attack_surface": "coding_agent",
 "initial_vector": "cross_site_request_to_local_agent_server",
 "agent_capability_abused": [
  "local_http_api",
  "code_execution",
  "self_upgrade_endpoint"
 ],
 "target_product": "OpenCode",
 "target_vendor": "OpenCode (open source)",
 "autonomy_level": "assistant",
 "impact_realized": false,
 "impact_type": [
  "remote_code_execution"
 ],
 "blast_radius": "OpenCode 1.14.30 through 1.18.21 installed via npm, pnpm or Bun and run as a local server; vulnerable versions had more than 647,000 downloads in one week",
 "cve": [],
 "taxonomy": {
  "owasp_asi": [
   "ASI05"
  ],
  "mitre_atlas": [],
  "labels": [
   "content_type_confusion",
   "browser_to_localhost",
   "code_injection"
  ]
 },
 "defense_present": null,
 "defense_bypassed": true,
 "fix_shipped": "OpenCode 1.18.22",
 "primary_sources": [
  "https://securitylabs.datadoghq.com/articles/opencode-upgrade-remote-code-execution/",
  "https://github.com/anomalyco/opencode/security/advisories/GHSA-632h-h47v-g4x4"
 ],
 "verified_quote": "A content-type confusion in the /global/upgrade API endpoint made an underlying code injection flaw exploitable",
 "confidence": "high",
 "notes": "Advisory GHSA-632h-h47v-g4x4; no CVE assigned. Reported by Datadog Security Labs. Exploitable only when the local OpenCode server is running and a victim visits an attacker-controlled page. The download figure measures exposure of vulnerable versions, not compromise; Datadog states it does not show how many users or machines were actually affected. No exploitation has been reported.",
 "risk_category": "security_fraud",
 "risk_secondary": [],
 "risk_subcategory": "Remote Code Execution & Sandbox Escape",
 "risk_sub_secondary": [],
 "ai_entity": "generative",
 "agency": "ai_as_target",
 "agency_debatable": false,
 "agency_reason": "a webpage reaches an unauthenticated local endpoint of the coding agent; no model action in the chain",
 "vector_family": "other",
 "vector_detail": "cross_site_request_to_local_agent_server",
 "guardrail_kind": [
  "unknown"
 ],
 "guardrail_outcome": "silent",
 "xrefs": {
  "aiid": [],
  "atlas": [],
  "cve": [],
  "ghsa": []
 },
 "primary_asi": "ASI05",
 "agent_framework": "unknown",
 "model_provider": "unknown",
 "model_name": "",
 "detection_mechanism": "unknown",
 "tool_access": "unknown",
 "financial_loss_band": "unknown",
 "eai_category": "privilege_escalation",
 "eai_domain": "access_control_and_permissions",
 "eai_secondary": [],
 "eai_reason": "subcategory: Remote Code Execution & Sandbox Escape",
 "asi_curated": [],
 "asi_scope": "in_scope",
 "asi_provenance": "rule",
 "asi_reason": "ASI05 (impact=code_exec)",
 "submitted_by": "EAI Internal"
}