CVE-2026-39891 describes a Remote Code Execution (RCE) vulnerability in praisonai versions up to 4.5.98. This vulnerability arises from the direct insertion of unescaped user input into template-rendering tools, enabling attackers to execute arbitrary code. The vulnerability impacts users of praisonai running versions 4.5.98 and earlier, and a fix is available in version 4.5.115.
PraisonAI 中的 CVE-2026-39891 允许通过将未转义的用户输入直接插入到模板渲染工具中来执行任意代码。 具体来说,createagentcentrictools() 函数返回工具(例如 acpcreatefile),这些工具使用模板渲染来处理文件内容。 当来自 agent.start() 的用户输入未转义地直接传递到这些工具时(如 agentcentric_example.py:85-86 中所示),输入中的模板表达式将被执行,而不是作为纯文本处理。 这使得攻击者可以在模板渲染过程中注入恶意代码,从而可能损害系统安全性。
该漏洞是通过提供包含模板表达式的恶意代理指令来利用的。 如果这些表达式未正确转义,则将在模板渲染过程中对其进行解释和执行。 文件 agentcentricexample.py:85-86 说明了可以利用此漏洞的场景。 例如,攻击者可以在代理指令中注入操作系统命令,这些命令将使用模板渲染进程的权限执行。 剥削的复杂性取决于系统配置和攻击者创建恶意代理指令的能力。
Organizations utilizing praisonai for agent-centric applications, particularly those relying on user-provided instructions or configurations, are at risk. Systems with older, unpatched versions of praisonai (≤4.5.98) are especially vulnerable. Environments where agent instructions are processed without proper input validation are also at increased risk.
• python / supply-chain:
import os
import subprocess
def check_praisonai_version():
try:
result = subprocess.run(['praisonai', '--version'], capture_output=True, text=True, check=True)
version = result.stdout.strip()
if version <= '4.5.98':
print(f"PRAISONAI version is vulnerable: {version}")
else:
print(f"PRAISONAI version is patched: {version}")
except FileNotFoundError:
print("PRAISONAI not found.")
except subprocess.CalledProcessError as e:
print(f"Error checking version: {e}")
check_praisonai_version()• generic web: Check for unusual characters or patterns in agent instructions submitted through any user interface. • generic web: Review access/error logs for any errors related to template rendering or unexpected code execution.
disclosure
漏洞利用状态
EPSS
0.05% (17% 百分位)
CISA SSVC
针对 CVE-2026-39891 的主要缓解措施是将 PraisonAI 升级到 4.5.115 版本或更高版本。 此版本包含修复程序,以防止将未转义的用户输入直接插入到模板渲染工具中。 此外,在将用户输入用于任何模板渲染上下文之前,必须实施所有用户输入的严格验证和转义。 检查源代码以识别和更正任何用户输入在没有适当保护的情况下直接用于模板的实例至关重要。 应用这些措施将有助于防止任意代码执行并保护系统免受潜在攻击。
Actualice PraisonAI a la versión 4.5.115 o superior para mitigar la vulnerabilidad de inyección de plantillas. Esta versión corrige el problema al escapar correctamente la entrada del usuario antes de usarla en el renderizado de plantillas.
漏洞分析和关键警报直接发送到您的邮箱。
模板渲染是一种将模板与数据结合以生成动态内容(例如网页或配置文件)的过程。
用户输入转义对于防止诸如代码注入之类的注入攻击至关重要,因为它确保特殊字符被解释为字面文本,而不是可执行代码。
如果无法立即升级,请实施额外的缓解措施,例如严格验证和转义用户输入,并考虑使用更安全的模板引擎。
如果您使用的是 PraisonAI 的 4.5.115 之前的版本,并且尚未实施缓解措施,则您的系统很可能容易受到攻击。
是的,有一些静态和动态分析工具可以帮助您识别代码中的转义漏洞。
CVSS 向量
上传你的 requirements.txt 文件,立即知道是否受影响。