GHSA-5r6c-gj4g-r697: Pip/praisonai vulnerability

Published Oct 8, 2026
·
Updated

Summary SecurityPolicy in praisonaiagents/sandbox/config.py is a documented configuration data class with fields for allowsubprocess, allowedpaths, blockedpaths, allowedcommands, blockedcommands, allowedimports, and blockedimports. Its strict() classmethod is explicitly described as creating "a strict security policy for untrusted code," setting allowsubprocess=False and allowfilewrite=False, and inheriting default blockedpaths (/etc/passwd, /etc/shadow, ~/.ssh, ~/.aws, ~/.config) and blockedcommands (rm -rf, dd, mkfs, fdisk, shutdown, reboot). The default sandbox backend, Subprocess Sandbox (praisonai/sandbox/subprocess.py), implements code/command execution by writing input to a temp file and invoking it via asyncio.createsubprocessexec() directly, with no checking of any kind against blockedcommands, blockedimports, blockedpaths, allowsubprocess, or allowfilewrite. A search across every sandbox backend file in the repository confirms these fields are referenced nowhere outside the data class that declares them. Only allownetwork and maxoutputsize are actually consulted. Verification Using a Security Policy.strict()-configured Sandbox Config(sandboxtype="subprocess") and the real Subprocess Sandbox:

subprocess.run(['id'], ...) executed and returned uid=0(root) gid=0(root) groups=0(root) — despite allowsubprocess=False. open('/etc/passwd').read() returned the real file contents in full — despite /etc/passwd being explicitly listed in blockedpaths. A shell command containing rm -rf actually created and then deleted a real test directory (confirmed via echo DELETED after the operation) — despite "rm -rf" being explicitly listed in blockedcommands.

All three were run against the same sandbox instance in one session, confirming simultaneous failure across the policy's command, path, and subprocess restrictions. Impact Any deployment relying on the default subprocess sandbox type — including via the API's own recommended strict() configuration for untrusted code — receives no actual protection against subprocess creation, sensitive file access, or destructive command execution. Since subprocess requires no extra dependencies and is the default Sandbox Config.sandboxtype, this is plausibly the active backend in many real deployments rather than an edge case. Root cause Security Policy was designed as a backend-agnostic configuration surface, but only allownetwork and maxoutputsize were ever wired into Subprocess Sandbox. The remaining fields exist as fully-documented configuration with no corresponding enforcement code in this backend. Suggested remediation Enforce blockedcommands/blockedimports/blockedpaths/allowsubprocess/allowfilewrite in Subprocess Sandbox before invoking the child process, or — given the well-known limits of denylist-style matching — default to the already-implemented native backend (Landlock/Seatbelt) for untrusted code rather than the unenforced subprocess backend. Consider having SecurityPolicy.strict() raise if instantiated against a backend that cannot enforce its fields.

Affected Software

1 affected componentFixes available
pip/praisonai<=4.6.77
4.6.78

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/praisonai to a version that resolves this vulnerability.

    Fixed in 4.6.78
  2. Configuration

    Enforce blocked_commands, blocked_imports, blocked_paths, allow_subprocess, and allow_file_write before invoking the child process.

    Subprocess Sandbox blocked_commands, blocked_imports, blocked_paths, allow_subprocess, allow_file_write = enforced
  3. Configuration

    Use the already-implemented native backend (Landlock/Seatbelt) instead of the unenforced Subprocess Sandbox for untrusted code.

    Sandbox Config sandbox_type = native backend (Landlock/Seatbelt)
  4. Configuration

    Make SecurityPolicy.strict() raise when instantiated against a backend that cannot enforce its configured fields.

    SecurityPolicy.strict() backend validation = raise on unsupported backend

Event History

Oct 8, 2026
Advisory Published
via GitHub·09:58 PM
Data Sourced
via GitHub·09:58 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Do the policy restrictions prevent untrusted code from running blocked commands or accessing blocked paths?

No. The sandbox backends do not consult blocked_commands, blocked_paths, allowed_commands, allowed_paths, allowed_imports, blocked_imports, allow_subprocess, or allow_file_write, including when SecurityPolicy.strict() is configured.

2

Which security controls are actually enforced by the sandbox implementation?

Only allow_network and max_output_size are consulted. The Subprocess Sandbox writes the supplied input to a temporary file and executes it directly with asyncio.create_subprocess_exec().

3

When is this most dangerous?

This is most dangerous when the sandbox is used to execute untrusted code under the assumption that SecurityPolicy.strict() prevents subprocess use, file writes, sensitive-path access, or dangerous command execution. The strict policy's documented restrictions are configuration fields only and are not enforced by the sandbox backends.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203