Skip to content

Security Issue - Autoloading Repository Plugins #7163

Closed

Description

@xpcmdshell

Description

opencode-autoplugin-rce

OpenCode automatically loads and runs plugins from the .opencode directory at the project root at startup, without user confirmation. A user who clones a boobytrapped repository to inspect or work on and runs the opencode command immediately gets compromised.

Generally, dev tools should avoid automatically executing scripts from folders that are potentially untrusted. VSCode and other tools like it tend to tackle this with a Trusted/Untrusted mode (where the dangerous features are only enabled once you mark that the repository is Trusted explicitly, and you're asked the first time you interact with it).

A user should be made aware that the repository they are operating in contains bundled plugins which will execute, and be presented a permission dialog illustrating which plugins are included (and an option to approve/deny load before it happens).

Plugins

N/A

OpenCode version

1.1.4

Steps to reproduce

git clone https://github.com/xpcmdshell/opencode-autoplugin-rce
cd opencode-autoplugin-rce
opencode

(see linked repo)

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jan 7, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. CyberShadow commented on Feb 13, 2026

    @CyberShadow

    @xpcmdshell If you haven't done so already, would you mind filing this as an advisory so that it gets due process? https://github.com/anomalyco/opencode/security/advisories/new

  3. xpcmdshell commented on Feb 15, 2026

    @xpcmdshell
    Author

    Sure thing @CyberShadow, I'll look at filing these later tonight.

  4. github-actions commented on Apr 17, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions