Skip to content

Comments

🛡️ Sentinel: [CRITICAL] Fix RCE in Rhai shell_execute#33

Closed
JustinWoodring wants to merge 1 commit intomainfrom
sentinel/fix-rce-rhai-shell-execute-4930606936570814363
Closed

🛡️ Sentinel: [CRITICAL] Fix RCE in Rhai shell_execute#33
JustinWoodring wants to merge 1 commit intomainfrom
sentinel/fix-rce-rhai-shell-execute-4930606936570814363

Conversation

@JustinWoodring
Copy link
Owner

🛡️ Sentinel: [CRITICAL] Fix RCE in Rhai shell_execute

🚨 Severity: CRITICAL
💡 Vulnerability: The shell_execute function in slatron-server allowed arbitrary command execution. This could allow an attacker with script editing privileges to execute any command on the server.
🎯 Impact: Full server compromise via RCE.
🔧 Fix:

  • Restricted shell_execute to a strict allowlist: yt-dlp, ffmpeg, ffprobe.
  • Added specific argument validation for yt-dlp to block --exec and related flags, preventing command injection bypasses.
    ✅ Verification:
  • Added test_shell_execute_arbitrary_command to verify arbitrary commands (e.g., echo) are blocked.
  • Added test_shell_execute_ytdlp_exec_blocked to verify yt-dlp --exec is blocked.
  • Verified legitimate usage (yt-dlp --version) is still allowed.

PR created automatically by Jules for task 4930606936570814363 started by @JustinWoodring

…uments

- Implemented an allowlist for `shell_execute` in `slatron-server` (allowed: `yt-dlp`, `ffmpeg`, `ffprobe`).
- Added strict argument checking for `yt-dlp` to block `--exec` variants, preventing RCE.
- Added regression and security tests in `slatron-server/src/rhai_engine/security_test.rs`.
- Documented findings in `.jules/sentinel.md`.

Co-authored-by: JustinWoodring <41842051+JustinWoodring@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant