Skip to content

Unescaped binary response scrambles TUI, possible code injection #6216

Closed as not planned

Description

@shakeelmohamed

Description

In plan mode, a prompt like analyze this image <URL> when <URL> does not contain a file extension appears to return a raw binary mess and can scramble the entire TUI.

With mixed results, some extreme hallucinations may also occur.

  • In a new session with the above prompt, unexpected Python code with Chinese characters have been printed in a long-running response for several minutes with no end in site. (edit: this single response ran for 24m 59s)
  • Another session began spewing some science-fiction narrative

I am hesitant to try this prompt in build mode because arbitary code execution seems likely.

Response when viewing a session like this by link in browser:

I see there was an issue fetching the image content. The URL appears to be a valid Unsplash image URL, but the fetch returned binary JPEG data instead of the expected markdown/text format. Let me try a different approach to analyze this image.

OpenCode version

v1.0.201, v1.0.203

Steps to reproduce

  1. New opencode session
  2. Switch to plan mode
  3. Enter this prompt. I have reproduced this bug with multiple URLs without a file extension.
analyze this image https://framerusercontent.com/images/qC0cuuQpKdCPD4vp677H00eV8LE.png?width=2200&height=1203

(edit: the following URL does not have this issue in today’s v1.0.203 release)

analyze this image https://images.unsplash.com/photo-1766445318570-1dc4bf3f5d79?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxmZWF0dXJlZC1waG90b3MtZmVlZHwzfHx8ZW58MHx8fHx8
  1. Watch the runaway train.

Screenshot and/or share link

Image Image Image Image

Operating System

MacOS 14.8, Docker

Terminal

Ghostty v1.2.3

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    perfIndicates a performance issue or need for optimization
    on Dec 26, 2025
  2. github-actions commented on Dec 26, 2025

    @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.

  3. thdxr commented on Mar 25, 2026

    @thdxr
    Member

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

  4. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    perfIndicates a performance issue or need for optimization
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions