{"answers":{"affected":"2 open source packages ship an affected version, including opencode-ai. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-22813 exists.","fix":"Upgrade opencode-ai to 1.1.10 or later.","what":"CVE-2026-22813 is a critical cross-site scripting vulnerability in anomalyco opencode, published on 12 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-22813 and fix it if it is affected.\n\nWhat it is: CVE-2026-22813 is a critical cross-site scripting vulnerability in anomalyco opencode, published on 12 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-22813 exists.\n\nAffected packages and fixed versions:\n- opencode-ai (npm): affected all versions; fixed in 1.1.10\n- opencode-ai (npm): affected all versions; fixed in 1.1.10\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-22813/ (Markdown: https://insights.sbomify.com/CVE-2026-22813/index.md)","id":"CVE-2026-22813","markdown":"https://insights.sbomify.com/CVE-2026-22813/index.md","name":"CVE-2026-22813","record":{"aliases":["GHSA-c83v-7274-4vgp"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"AI coding agent","requires_auth":"none","summary":"Attackers can execute arbitrary commands on the local system via XSS in the OpenCode web UI by controlling LLM responses.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"opencode","vendor":"anoma"}],"cvss":{"score":9.4,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"OpenCode is an open source AI coding agent. The markdown renderer used for LLM responses will insert arbitrary HTML into the DOM. There is no sanitization with DOMPurify or even a CSP on the web interface to prevent JavaScript execution via HTML injection. This means controlling the LLM response for a chat session gets JavaScript execution on the http://localhost:4096 origin. This vulnerability is fixed in 1.1.10.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Malicious website can execute commands on the local system through XSS in the OpenCode web UI","id":"CVE-2026-22813","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":1,"next":{"headline":"Mass Assignment in AdonisJS Lucid Allows Overwriting Internal ORM State","id":"CVE-2026-22814"},"packages":[{"ecosystem":"npm","fixed":["1.1.10"],"introduced":["0"],"last_affected":[],"package":"opencode-ai","purl":null,"source":"GHSA-c83v-7274-4vgp"},{"ecosystem":"npm","fixed":["1.1.10"],"introduced":["0"],"last_affected":[],"package":"opencode-ai","purl":"pkg:npm/opencode-ai","source":"GHSA-c83v-7274-4vgp"}],"prev":{"headline":"OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution","id":"CVE-2026-22812"},"products":["opencode"],"published":"2026-01-12","related":[{"cvss_score":8.8,"headline":"OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution","id":"CVE-2026-22812","kev_date_added":null,"published":"2026-01-12"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-01-13","vendors":["anomalyco"]},"summary":"Attackers can execute arbitrary commands on the local system via XSS in the OpenCode web UI by controlling LLM responses.","url":"https://insights.sbomify.com/CVE-2026-22813/"}