fix(security): sandbox RLM REPL exec — CRITICAL prompt-injection RCE - #10
Open
zenprocess wants to merge 1 commit into
Open
fix(security): sandbox RLM REPL exec — CRITICAL prompt-injection RCE#10zenprocess wants to merge 1 commit into
zenprocess wants to merge 1 commit into
Conversation
vendor/rlm_repl/sandbox.py exec()'d LLM-authored Python with unrestricted __builtins__ on untrusted session-transcript content — an attacker planting a repl block in a transcript got RCE on the developer's machine merely by running `afterburn discover`. Defense in depth: - safe-builtins allowlist (~50 names; no __import__/open/eval/exec/compile/getattr) - AST check rejecting imports, dunder-attribute escapes (().__class__.__bases__...), forbidden names - opt-in gate AFTERBURN_ENABLE_RLM_EXEC; default discover SKIPS model-authored exec with a warning - 24 tests: blocks import os/__import__/open/subclasses-escape/eval/exec/globals; benign analysis still works Found by the cal adversarial N-reviewer harness (3/3 majority-verify).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



CRITICAL (found by the cal adversarial N-reviewer harness, 3/3 majority-verify).
vendor/rlm_repl/sandbox.pyexec()'d LLM-authored Python with unrestricted__builtins__on untrusted session-transcript content. The friction pass runs on transcripts >=10MB during defaultafterburn discover; an attacker planting a repl block (import os; os.system(...)) in a transcript message got RCE / secret exfil on the developer's machine merely by analyzing a session.Defense in depth: (1) safe-builtins allowlist, no import/open/eval/exec/getattr; (2) AST pre-check rejecting imports, dunder-attribute escapes, forbidden names; (3) opt-in gate
AFTERBURN_ENABLE_RLM_EXEC— defaultdiscoverskips model-authored exec with a warning. 24 new tests; full suite 108 green.