[GH-ISSUE #3973] [Issue]: Professor Mari workspace shell is not OS-level sandboxed #2148

Closed
opened 2026-10-21 05:45:46 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jul 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3973

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Professor Mari executes model-generated shell commands with the Marinara process user's host permissions. Setting the repository as the working directory does not prevent access to files, credentials, environment secrets, network resources, or paths outside the selected workspace.

Expected behavior

Workspace tools should execute inside an OS-level security boundary that restricts filesystem and network access. Only the selected workspace should be exposed, preferably read-only by default, with protection against path traversal and symlink escapes and explicit approval required for shell commands, writes, and network access.

Actual behavior

Shell commands run under the same OS user as Marinara, receive a copy of the server process environment, and use the repository path only as their starting directory. The reporter confirmed that Professor Mari could inspect files outside the Marinara workspace before Marinara was placed inside an external sandbox.

Steps to reproduce

  1. Install Marinara Engine v2.3.4 (b7545a6) from a GitHub pull on Ubuntu Jammy Jellyfish.
  2. Start Professor Mari in workspace/local-helper mode without external OS-level containment.
  3. Use a workspace command such as bash or file read to target a path outside the Marinara repository.
  4. Observe that the command can access resources outside the workspace when they are accessible to the OS user running Marinara.

Environment

  • Marinara Engine version: v2.3.4 (b7545a6), release titled "Latest and minimum safe version"
  • Install type: source
  • OS + version: Ubuntu Jammy Jellyfish
  • Browser or app shell: Professor Mari workspace/local-helper mode

Logs, screenshots, or video

Relevant implementation reported as: spawn(shell, shellArgs, { cwd: this.workspaceRoot, env, windowsHide: true }); No screenshots or video provided.

Additional context

Suggested severity: Critical. A remote or compromised model endpoint, prompt injection, or model error could potentially cause arbitrary host file access, credential exposure, code execution, modification, or data exfiltration. Initial mitigation should disable unrestricted bash by default, require explicit opt-in and per-command confirmation, warn that the runtime is not sandboxed, and recommend Docker or equivalent containment until native sandboxing is implemented. Documentation should not claim Professor Mari cannot reach the rest of the computer unless that guarantee is enforced by an OS-level boundary.

Discord thread: Security: Professor Mari workspace shell is not actually sandboxed
Discord thread link: https://discord.com/channels/1417099416812392641/1529785179592200284
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (1 message)
[2026-07-23T09:40:08.849Z] Nobody: OS: Ubuntu Jammy Jellyfish
Installation method: GitHub pull
Marinara Engine version: v2.3.4 (b7545a6), release titled “Latest and minimum safe version”
Chatting mode: Professor Mari workspace/local-helper mode

Suggested severity: Critical. Professor Mari can translate model output from local or remote endpoints into host shell commands running with the Marinara process’s OS permissions, without actual OS-level confinement. This may permit arbitrary file access, credential exposure, code execution, and data exfiltration outside the stated workspace boundary.

Professor Mari’s workspace runtime appears to execute model-generated shell commands directly on the host, with the Marinara repository set only as the process working directory.

The relevant implementation launches the system shell approximately as follows:

spawn(shell, shellArgs, {
  cwd: this.workspaceRoot,
  env,
  windowsHide: true,
});

Setting cwd selects the shell’s starting directory. It does not create a filesystem boundary. Unless some external containment mechanism is present, the process can access any files and resources available to the OS account running Marinara, including paths outside the ME workspace.

This is especially concerning when Professor Mari is used with a non-local model endpoint. Model output is parsed into workspace commands, including read, write, edit, and bash, which can then be executed locally. A remote or compromised endpoint, prompt injection, or ordinary model error could therefore cause commands to read or modify host-accessible data.

This is not hypothetical in terms of filesystem reach: before I placed ME inside my own sandbox, Professor Mari was able to inspect files outside the Marinara workspace on my system.

Current behavior
Professor Mari has a general-purpose shell tool.
Shell commands run under the same OS user as the Marinara process.
The repository path is used as cwd, but commands are not confined to it.
The shell receives a copy of the server process environment.
There does not appear to be mandatory approval for every shell command.
Existing command-string checks around ME storage are not general OS-level containment.
Expected behavior

Professor Mari’s workspace tools should run inside an actual security boundary. At minimum:

run commands in a container, restricted OS account, or equivalent sandbox;
expose only the selected ME workspace through a narrow bind mount;
make the workspace read-only by default;
deny access to $HOME, SSH keys, browser profiles, credentials, environment secrets, and arbitrary host paths;
disable network access by default or require explicit approval;
require per-command approval for shell execution and filesystem writes;
clearly display the exact command, working directory, affected paths, and requested network access before execution;
prevent path traversal and symlink escapes from the allowed workspace;
document the threat model and limitations in the Professor Mari documentation.

A concise initial mitigation could be:

Disable unrestricted bash by default.
Require explicit opt-in to enable it.
Add mandatory confirmation for every shell command.
Display a warning that the current runtime is not sandboxed.
Recommend running ME inside Docker or another containment mechanism until native sandboxing is implemented.

The documentation should also avoid saying Professor Mari “cannot reach the rest of your computer” unless that guarantee is enforced by an OS-level boundary. A working-directory restriction alone does not provide that guarantee.

This report is not arguing that extensions are harmless or should remain enabled despite known vulnerabilities. It is a separate security concern: model-generated commands currently appear capable of executing with broad host permissions, and that surface should be independently contained.
[Discord message: https://discord.com/channels/1417099416812392641/1529785179592200284/1529785179592200284]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3973 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Professor Mari executes model-generated shell commands with the Marinara process user's host permissions. Setting the repository as the working directory does not prevent access to files, credentials, environment secrets, network resources, or paths outside the selected workspace. ## Expected behavior Workspace tools should execute inside an OS-level security boundary that restricts filesystem and network access. Only the selected workspace should be exposed, preferably read-only by default, with protection against path traversal and symlink escapes and explicit approval required for shell commands, writes, and network access. ## Actual behavior Shell commands run under the same OS user as Marinara, receive a copy of the server process environment, and use the repository path only as their starting directory. The reporter confirmed that Professor Mari could inspect files outside the Marinara workspace before Marinara was placed inside an external sandbox. ## Steps to reproduce 1. Install Marinara Engine v2.3.4 (b7545a6) from a GitHub pull on Ubuntu Jammy Jellyfish. 2. Start Professor Mari in workspace/local-helper mode without external OS-level containment. 3. Use a workspace command such as bash or file read to target a path outside the Marinara repository. 4. Observe that the command can access resources outside the workspace when they are accessible to the OS user running Marinara. ## Environment - Marinara Engine version: v2.3.4 (b7545a6), release titled "Latest and minimum safe version" - Install type: source - OS + version: Ubuntu Jammy Jellyfish - Browser or app shell: Professor Mari workspace/local-helper mode ## Logs, screenshots, or video Relevant implementation reported as: spawn(shell, shellArgs, { cwd: this.workspaceRoot, env, windowsHide: true }); No screenshots or video provided. ## Additional context Suggested severity: Critical. A remote or compromised model endpoint, prompt injection, or model error could potentially cause arbitrary host file access, credential exposure, code execution, modification, or data exfiltration. Initial mitigation should disable unrestricted bash by default, require explicit opt-in and per-command confirmation, warn that the runtime is not sandboxed, and recommend Docker or equivalent containment until native sandboxing is implemented. Documentation should not claim Professor Mari cannot reach the rest of the computer unless that guarantee is enforced by an OS-level boundary. Discord thread: Security: Professor Mari workspace shell is not actually sandboxed Discord thread link: https://discord.com/channels/1417099416812392641/1529785179592200284 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (1 message)</summary> ```text [2026-07-23T09:40:08.849Z] Nobody: OS: Ubuntu Jammy Jellyfish Installation method: GitHub pull Marinara Engine version: v2.3.4 (b7545a6), release titled “Latest and minimum safe version” Chatting mode: Professor Mari workspace/local-helper mode Suggested severity: Critical. Professor Mari can translate model output from local or remote endpoints into host shell commands running with the Marinara process’s OS permissions, without actual OS-level confinement. This may permit arbitrary file access, credential exposure, code execution, and data exfiltration outside the stated workspace boundary. Professor Mari’s workspace runtime appears to execute model-generated shell commands directly on the host, with the Marinara repository set only as the process working directory. The relevant implementation launches the system shell approximately as follows: spawn(shell, shellArgs, { cwd: this.workspaceRoot, env, windowsHide: true, }); Setting cwd selects the shell’s starting directory. It does not create a filesystem boundary. Unless some external containment mechanism is present, the process can access any files and resources available to the OS account running Marinara, including paths outside the ME workspace. This is especially concerning when Professor Mari is used with a non-local model endpoint. Model output is parsed into workspace commands, including read, write, edit, and bash, which can then be executed locally. A remote or compromised endpoint, prompt injection, or ordinary model error could therefore cause commands to read or modify host-accessible data. This is not hypothetical in terms of filesystem reach: before I placed ME inside my own sandbox, Professor Mari was able to inspect files outside the Marinara workspace on my system. Current behavior Professor Mari has a general-purpose shell tool. Shell commands run under the same OS user as the Marinara process. The repository path is used as cwd, but commands are not confined to it. The shell receives a copy of the server process environment. There does not appear to be mandatory approval for every shell command. Existing command-string checks around ME storage are not general OS-level containment. Expected behavior Professor Mari’s workspace tools should run inside an actual security boundary. At minimum: run commands in a container, restricted OS account, or equivalent sandbox; expose only the selected ME workspace through a narrow bind mount; make the workspace read-only by default; deny access to $HOME, SSH keys, browser profiles, credentials, environment secrets, and arbitrary host paths; disable network access by default or require explicit approval; require per-command approval for shell execution and filesystem writes; clearly display the exact command, working directory, affected paths, and requested network access before execution; prevent path traversal and symlink escapes from the allowed workspace; document the threat model and limitations in the Professor Mari documentation. A concise initial mitigation could be: Disable unrestricted bash by default. Require explicit opt-in to enable it. Add mandatory confirmation for every shell command. Display a warning that the current runtime is not sandboxed. Recommend running ME inside Docker or another containment mechanism until native sandboxing is implemented. The documentation should also avoid saying Professor Mari “cannot reach the rest of your computer” unless that guarantee is enforced by an OS-level boundary. A working-directory restriction alone does not provide that guarantee. This report is not arguing that extensions are harmless or should remain enabled despite known vulnerabilities. It is a separate security concern: model-generated commands currently appear capable of executing with broad host permissions, and that surface should be independently contained. [Discord message: https://discord.com/channels/1417099416812392641/1529785179592200284/1529785179592200284] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:46 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2148
No description provided.