[GH-ISSUE #3824] [Issue]: Restrict native folder actions to the host device #2061

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

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

Summary

The native folder-opening endpoints for fonts and game assets can launch host GUI processes for authenticated non-loopback clients because the routes do not require loopback-only privileged access.

Expected behavior

Only a browser running on the Marinara host device should be able to trigger Explorer, Finder, or xdg-open. Remote clients should receive the existing privileged-access denial without learning an absolute host path.

Actual behavior

POST /api/fonts/open-folder and POST /api/game-assets/open-folder launch the native file manager and return an absolute host path without passing through the loopback-only privileged gate. Global authentication and CSRF reduce exposure; this is not command injection or general remote-code execution.

Steps to reproduce

  1. Run Marinara from source and make the server available to an authenticated or otherwise trusted non-loopback client.
  2. Send a POST request to /api/fonts/open-folder or /api/game-assets/open-folder.
  3. Observe that the host file manager is launched and the response includes an absolute host path.

Environment

  • Marinara Engine version: 2.3.3
  • Install type: source
  • OS + version: Windows 11 (observed; route boundary is platform-independent)
  • Browser or app shell: Chrome

Logs, screenshots, or video

No additional logs. The affected route handlers directly invoke the platform file-manager command.

Additional context

The adjacent folder-picking route already uses loopback-only privileged access. The client should also guard these actions so remote users receive a clear host-device message without a redundant generic error.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jul 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3824 ## Summary The native folder-opening endpoints for fonts and game assets can launch host GUI processes for authenticated non-loopback clients because the routes do not require loopback-only privileged access. ## Expected behavior Only a browser running on the Marinara host device should be able to trigger Explorer, Finder, or `xdg-open`. Remote clients should receive the existing privileged-access denial without learning an absolute host path. ## Actual behavior `POST /api/fonts/open-folder` and `POST /api/game-assets/open-folder` launch the native file manager and return an absolute host path without passing through the loopback-only privileged gate. Global authentication and CSRF reduce exposure; this is not command injection or general remote-code execution. ## Steps to reproduce 1. Run Marinara from source and make the server available to an authenticated or otherwise trusted non-loopback client. 2. Send a POST request to `/api/fonts/open-folder` or `/api/game-assets/open-folder`. 3. Observe that the host file manager is launched and the response includes an absolute host path. ## Environment - Marinara Engine version: 2.3.3 - Install type: source - OS + version: Windows 11 (observed; route boundary is platform-independent) - Browser or app shell: Chrome ## Logs, screenshots, or video No additional logs. The affected route handlers directly invoke the platform file-manager command. ## Additional context The adjacent folder-picking route already uses loopback-only privileged access. The client should also guard these actions so remote users receive a clear host-device message without a redundant generic error. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:02 +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#2061
No description provided.