OS Command Injection in praisonaiagents
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
A vulnerability tracked as CVE-2026-40111 has been found in praisonaiagents.
Risk of unauthorized operations or information disclosure.
What to do: upgrade praisonaiagents to 1.5.128 or later.
If unsure, ask your IT team or search "praisonaiagents CVE-2026-40111" on the vendor's site.
CVE-2026-40111 (praisonaiagents) — CWE-78
Patched: 1.5.128 — 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.
OS command injection (CWE-78) exists in praisonaiagents.
Check the vendor advisory for the affected versions of praisonaiagents.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 1.5.128.
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 'praisonaiagents' . 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
-
1
Identify exposureidentify
grep -r 'praisonaiagents' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
praisonaiagentsを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply patchpatch
Upgrade praisonaiagents to 1.5.128ステージング環境で 1.5.128 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| PyPIpraisonaiagents |
< 1.5.128→ 1.5.128 |
1.5.128 |
| pippraisonaiagents |
< 1.5.128→ 1.5.128 |
1.5.128 |
Original description The description as published by the source.
Summary
The memory hooks executor in praisonaiagents passes a user-controlled command string
directly to subprocess.run() with shell=True at
src/praisonai-agents/praisonaiagents/memory/hooks.py lines 303 to 305.
No sanitization, no shlex.quote(), no character filter, and no allowlist check
exists anywhere in this file. Shell metacharacters including semicolons, pipes,
ampersands, backticks, dollar-sign substitutions, and newlines are interpreted by
/bin/sh before the intended command executes.
Two independent attack surfaces exist. The first is via pre_run_command and
post_run_command hook event types registered through the hooks configuration.
The second and more severe surface is the .praisonai/hooks.json lifecycle
configuration, where hooks registered for events such as BEFORE_TOOL and
AFTER_TOOL fire automatically during agent operation. An agent that gains
file-write access through prompt injection can overwrite .praisonai/hooks.json
and have its payload execute silently at every subsequent lifecycle event without
further user interaction.
This file and these surfaces are not covered by any existing published advisory.
Vulnerability Description
File : src/praisonai-agents/praisonaiagents/memory/hooks.py
Lines : 303 to 305
Vulnerable code:
result = subprocess.run(
command,
shell=True,
cwd=str(self.workspace_path),
env=env,
capture_output=True,
text=True,
timeout=hook.timeout
)
The variable comman…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web pypi.org