Skip to content

Security: Fix critical OS mode auto-run and remote profile RCE#1741

Open
johnpippett wants to merge 1 commit intoopeninterpreter:mainfrom
johnpippett:security/critical-fixes-2026-04-28
Open

Security: Fix critical OS mode auto-run and remote profile RCE#1741
johnpippett wants to merge 1 commit intoopeninterpreter:mainfrom
johnpippett:security/critical-fixes-2026-04-28

Conversation

@johnpippett
Copy link
Copy Markdown

Summary

Fixes two critical security findings identified in audit 2026-04-28.

1. OS mode defaults to unattended execution with full system control

File: interpreter/terminal_interface/profiles/defaults/os.py

  • Changed auto_run default from True to False
  • Changed loop default from True to False
  • Removed the second forced auto_run = True override at the end of the profile
  • Updated the warning message to accurately reflect that approval is now required by default

2. Profile loading executes arbitrary code from remote URLs

File: interpreter/terminal_interface/profiles/profiles.py

  • Disallowed downloading remote .py profiles via requests.get(); now raises a security exception
  • Added a source parameter to apply_profile() to track the original profile source URL/path
  • Added an exec() guard that rejects start_script execution for any profile sourced from an http:// or https:// URL

These are minimal, surgical changes that preserve local .py profile functionality while eliminating the remote arbitrary code execution vector.

Test Results

  • Syntax validation passed for both modified files (py_compile)
  • No existing tests specifically cover profile loading or OS defaults; full pytest suite could not be executed locally due to Python 3.14 incompatibility with the project's <3.13 requirement

…ile exec

- Change interpreter/terminal_interface/profiles/defaults/os.py:
  - Set auto_run=False and loop=False by default
  - Remove forced auto_run=True override
  - Update warning message to reflect approval-required default

- Change interpreter/terminal_interface/profiles/profiles.py:
  - Disallow downloading and executing remote .py profiles
  - Add source URL guard in apply_profile to prevent exec() of remote start_script

Addresses critical findings from security audit 2026-04-28.
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