Skip to content

[Bug] [Security] Unsloth Studio: Code execution (terminal) tool sandboxing can be bypassed to allow privileged commands like sudo/chmod #4818

Closed

Description

@xyehya

I just started playing around with the tools in the chat page on Unsloth Studio and noticed the sandboxing isn't robust and can be bypassed.

I have Cyber background but not a full-blown developer so I can help with this issue if/when needed.

Attached images for a clearer explanation sample while I was testing the gemma-4-26B-A4B-it ggufs

Image Image

🦥 You can also ask via our Reddit page: https://reddit.com/r/unsloth/

Activity

  1. rolandtannous commented on Apr 3, 2026

    @rolandtannous
    Contributor

    Need to be able to reproduce. Will get back to you on this.
    Note that small LLMs can completely hallucinate the answer (ie telling you it sees a file that it does not actually have access to or does not see).

  2. xyehya commented on Apr 3, 2026

    @xyehya
    Author

    its not about seeing the file. the terminal command actually ran and i verified it (the chmod +x succeeded and the execute bit was set on the actual file on disk)

    my analysis was not based on the LLMs output solely.

  3. added a commit that references this issue on Apr 3, 2026
    2c73ab7
  4. added a commit that references this issue on Apr 7, 2026
    a75b42f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    unsure bug?

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions