CVE-2026-34955: Praisonai PraisonAI Has Sandbox Escape Vulnerability
HIGHCVE-2026-34955 is a HIGH (CVSS 8.8) praisonai has sandbox escape vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Praisonai libraries in the PyPI ecosystem. The issue involves praisonai has sandbox escape via shell=true and bypassable blocklist in subprocesssandbox. Remediation is available by upgrading affected packages to version 4.5.97.
CVE-2026-34955 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-34955
To remediate this vulnerability, upgrade all affected Praisonai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install praisonai>=4.5.97
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show praisonai
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-34955, inspect your installed packages using pip:
pip show praisonai
Analyze the terminal output to locate any version of Praisonai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.97), your application is affected.
Note: The pip show praisonai command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Praisonai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34955 Affected Praisonai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
praisonai
|
PyPI |
< 4.5.97
|
4.5.97
|
References
Frequently Asked Questions
What is CVE-2026-34955?
Which Praisonai versions are affected?
What version fixes CVE-2026-34955?
Is praisonai affected?
What is the CVSS score of CVE-2026-34955?
What CWE is associated with CVE-2026-34955?
How can I check PyPI dependencies for CVE-2026-34955?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r4f2-3m54-pp7q",
"modified" : "2026-04-06T22:54:33Z",
"published" : "2026-04-01T23:26:01Z",
"aliases" : [ "CVE-2026-34955" ],
"summary" : "PraisonAI Has Sandbox Escape via shell=True and Bypassable Blocklist in SubprocessSandbox",
"details" : "### Summary\n\n`SubprocessSandbox` in all modes (BASIC, STRICT, NETWORK_ISOLATED) calls `subprocess.run()` with `shell=True` and relies solely on string-pattern matching to block dangerous commands. The blocklist does not include `sh` or `bash` as standalone executables, allowing trivial sandbox escape in STRICT mode via `sh -c '<command>'`.\n\n### Details\n\n`sandbox_executor.py:179` (source) -> `sandbox_executor.py:326` (sink)\n```python\n# source -- string-pattern blocklist, sh and bash not in blocked_commands\ncmd_name = Path(parts[0]).name\nif cmd_name in self.policy.blocked_commands: # sh, bash not blocked\n raise SecurityError(...)\ndangerous_patterns = [\n (\"| sh\", ...), # requires space -- \"id|bash\" evades this\n (\"| bash\", ...), # requires space\n]\n\n# sink -- shell=True spawns /bin/sh regardless of sandbox mode\nresult = subprocess.run(\n command,\n shell=True,\n ...\n)\n```\n\n### PoC\n```python\n# tested on: praisonai==4.5.87 (source install)\n# install: pip install -e src/praisonai\nimport sys\nsys.path.insert(0, 'src/praisonai')\nfrom praisonai.cli.features.sandbox_executor import SubprocessSandbox, SandboxPolicy, SandboxMode\n\npolicy = SandboxPolicy.for_mode(SandboxMode.STRICT)\nsandbox = SubprocessSandbox(policy=policy)\n\nresult = sandbox.execute(\"sh -c 'id'\")\nprint(result.stdout)\n# expected output: uid=1000(narey) gid=1000(narey) groups=1000(narey)...\n```\n\n### Impact\n\nUsers who deploy with `--sandbox strict` have no meaningful OS-level isolation. Any command blocked by the policy (curl, wget, nc, ssh) is trivially reachable via `sh -c '<blocked_command>'`. Combined with agent prompt injection, an attacker can escape the sandbox and reach the network, filesystem, and cloud metadata services.\n\n### Suggested Fix\n```python\nimport shlex\n\nresult = subprocess.run(\n shlex.split(command),\n shell=False,\n cwd=cwd,\n env=env,\n capture_output=capture_output,\n text=True,\n timeout=timeout\n)\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "praisonai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.97"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.96"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-r4f2-3m54-pp7q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34955"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/MervinPraison/PraisonAI"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-01T23:26:01Z",
"nvd_published_at" : "2026-04-04T00:16:19Z"
}
}