Skip to content

Security: Command allowlist missing xargs, awk, perl, python, ruby (sandbox escape) #1923

@Liohtml

Description

@Liohtml

Summary

The command execution security policy in src/openhuman/security/policy.rs blocks find -exec and git config but does not block command interpreters that can execute arbitrary code:

  • xargsecho rm | xargs executes arbitrary commands
  • awkawk 'BEGIN{system("rm -rf /")}' executes shell commands
  • perlperl -e 'system("...")'
  • python / python3python -c 'import os; os.system("...")'
  • rubyruby -e 'system("...")'
  • bash / sh / env — direct shell access

Location

src/openhuman/security/policy.rsis_command_allowed() / is_args_safe()

Impact

High — An agent or compromised prompt can escape the tool sandbox by chaining through these interpreters, bypassing all path and command restrictions.

Suggested Fix

Add these to the high-risk command list in is_args_safe(), or block them entirely when called with code-execution flags (-e, -c, BEGIN{}).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions