/

CVE-2026-57133

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in PraisonAI shell()

CVE-2026-57133

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-693, CWE-863

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection vulnerability in PraisonAI's shell() helper validates only the first whitespace-delimited token while passing the entire input to a system shell. If an attacker can influence the helper's command argument, they may append shell syntax that executes arbitrary commands with the PraisonAI process privileges.

Affected context

The issue occurs in PraisonAI deployments using the affected TypeScript utility-tools shell() helper. Risk is present when untrusted or insufficiently constrained input can reach the helper and the process invokes a shell with the complete command string after checking only its initial token.

Exploit preconditions

  • Attack surface: The PraisonAI TypeScript utility-tools shell() helper
  • Required access: Ability to influence the command string supplied to the helper
  • Trigger point: Execution of the constructed command through Node.js child_process.exec()
  • Why exploitation is possible: Validation covers only the first token, while the complete original string is interpreted by a shell

Why this happens

The underlying bug is incomplete command validation combined with shell-based execution. Checking whether only the first token belongs to an allowlist does not constrain later shell operators or additional commands, and passing the original string to child_process.exec() leaves those elements available for interpretation. This maps primarily to CWE-78, OS Command Injection, with related concerns involving insufficient enforcement of security controls and authorization checks.

Potential impact

  • An attacker may execute arbitrary operating-system commands
  • The application process and its accessible files or secrets could be compromised
  • Sensitive data could be read, modified, or exfiltrated
  • The vulnerable process could be used for lateral movement or persistence
  • Service availability could be disrupted

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from

security-sensitive execution paths.

Common defensive patterns include:

  • Prefer direct process-spawning APIs that accept an executable and separate argument array
  • Use strict allowlists for complete commands and structured arguments rather than validating only a command prefix
  • Treat all externally influenced command values as untrusted
  • Avoid interpolating user-controlled data into command strings
  • Apply least-privilege permissions, restricted environment variables, and sandboxing to the executing process
  • Enforce authorization and policy checks before command execution

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying child_process.exec() or equivalent shell-enabled APIs
  • Searches for allowlist checks applied only to prefixes, tokens, or command names before full-string execution
  • Code review checks for string concatenation or interpolation in process-execution calls
  • Runtime logging and policy enforcement for unexpected command arguments or shell metacharacters
  • Automated security review tools that flag shell execution with data-flow from untrusted inputs

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/6b4b59fbe71a74983626c7a0cf7e10c47cd004f9
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.62
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-5jv7-2mjm-h6qj

Frequently asked

questions

It can be exploitable through any reachable feature that allows an attacker

to influence the command passed to PraisonAI's shell() helper. Direct remote

exploitation depends on how that feature is exposed and protected.

Authentication requirements depend on the surrounding application and agent

workflows. The essential prerequisite is the ability to control or affect the

helper's command input.

Avoid shell-interpreted command strings and use direct process execution with

separately validated executable names and arguments. If shell execution is

unavoidable, validate the complete command structure and enforce a narrowly

defined policy.

Treat command inputs as untrusted, use secure process APIs by default, apply

least privilege, and include static analysis, code review, and runtime policy

checks for command construction and execution.

Find out what's already
exploitable in your codebase.