Code Injection in praisonai (CVE-2026-61447)
Summary
Code injection in praisonai (CVE-2026-61447). Successful exploitation can lead to full system takeover. Exploitable via OPENAI_API_KEY. Mitigation: upgrade to 1.6.78 or later.
Original description
The description as published by the source.
Summary
CodeAgent._execute_python() executes LLM-generated Python code in a subprocess with the complete parent-process environment (os.environ.copy()), zero AST validation, zero import restrictions, and no sandbox enforcement — even when CodeConfig(sandbox=True) is explicitly set. This allows an attacker who can influence LLM output (via prompt injection in agent input, tool results, or ingested content) to exfiltrate all environment secrets (API keys, database credentials, cloud tokens) and execute arbitrary code on the host.
Details
src/praisonai-agents/praisonaiagents/agent/code_agent.py (lines 253–308):
def _execute_python(self, code: str, **kwargs) -> Dict[str, Any]:
import subprocess
import time
import tempfile
import os
start_time = time.time()
# Write code to temp file
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
f.write(code) # ← No AST validation, no import blocking
temp_file = f.name
try:
# Execute in subprocess (basic sandboxing)
env = os.environ.copy() # ← FULL parent environment
env.update(self._code_config.environment)
result = subprocess.run(
["python", temp_file],
capture_output=True,
text=True,
timeout=self._code_config.timeout,
cwd=self._code_config.working_directory,
env=env # ← All secrets expose…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-61447 has been found in praisonai.
Attackers can target a specific entry point like OPENAI_API_KEY over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 10.0/10.
What to do: upgrade praisonai to 1.6.78 or later.
If unsure, ask your IT team or search "praisonai CVE-2026-61447" on the vendor's site.
CVE-2026-61447 (praisonai) — CWE-94 / CVSS v3 10.0
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: OPENAI_API_KEY / DATABASE_URL / execute_code / python_tools.py
Patched: 1.6.78 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in praisonai. Attackers reach the vulnerable code path via OPENAI_API_KEY without authentication.
Check the vendor advisory for the affected versions of praisonai. Attack surface: OPENAI_API_KEY / DATABASE_URL / execute_code / python_tools.py.
Severity: Critical (CVSS 10.0/10). Successful exploitation can lead to full system takeover.
Update to 1.6.78.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'praisonai' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'praisonai' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
praisonaiを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade praisonai to 1.6.78ステージング環境で 1.6.78 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- web github.com
- web vulncheck.com
- web github.com