Summary
The approval system in PraisonAI Agents caches tool approval decisions by tool name only, not by invocation arguments. Once a user approves execute_command for any command (e.g., ls -la), all subsequent execute_command calls in that execution context bypass the approval prompt entirely. Combined with os.environ.copy() passing all process environment variables to subprocesses, this allows an LLM agent (potentially via prompt injection) to silently exfiltrate API keys and credentials without further user consent.
Details
The require_approval decorator in src/praisonai-agents/praisonaiagents/approval/__init__.py:176-178 checks approval status by tool name only:
@wraps(func)
def wrapper(*args, **kwargs):
if is_already_approved(tool_name): # line 177, checks only tool_name
return func(*args, **kwargs) # line 178, bypasses ALL approval
The mark_approved function in registry.py:144-147 stores only the tool name string:
def mark_approved(self, tool_name: str) -> None:
approved = self._approved_context.get(set())
approved.add(tool_name) # stores "execute_command", not args
self._approved_context.set(approved)
The approval context is never cleared during agent execution, clear_approved() exists (registry.py:152) but is never called in the agent's tool execution path (agent/tool_execution.py).
Meanwhile, the ConsoleBackend UI at backends.py:95-96 misleads the user:
return Confirm.ask(
f"Do you want to execute this {request.risk_level} risk tool?",
# "this" implies per-invocation approval
)
The UI displays the specific command arguments (lines 81-85), creating a reasonable expectation that the user is approving only that specific invocation.
Additionally, shell_tools.py:77 passes the full process environment to every subprocess:
process_env = os.environ.copy() # includes OPENAI_API_KEY, etc.
There is no command filtering, blocklist, or environment variable sanitization in the shell tools module.
PoC
from praisonaiagents import Agent
from praisonaiagents.tools.shell_tools import execute_command
# Step 1: Create agent with shell tool
agent = Agent(
name="worker",
instructions="You are a helpful assistant.",
tools=[execute_command]
)
# Step 2: Agent requests benign command, user sees Rich panel:
# Function: execute_command
# Risk Level: CRITICAL
# Arguments:
# command: ls -la
# "Do you want to execute this critical risk tool?" [y/N]
# User approves → mark_approved("execute_command") is called
# Step 3: All subsequent execute_command calls bypass approval silently:
# execute_command(command="env")
# → returns ALL environment variables (OPENAI_API_KEY, AWS_SECRET_ACCESS_KEY, etc.)
# → NO approval prompt shown
# Step 4: Targeted extraction also bypasses approval:
# execute_command(command="printenv OPENAI_API_KEY")
# → returns the specific API key
# → NO approval prompt shown
# Verification: check the approval cache
from praisonaiagents.approval import is_already_approved
# After approving "ls -la":
# is_already_approved("execute_command") → True
# Any execute_command call now returns immediately at __init__.py:177-178
Impact
- Secret exfiltration: An LLM agent (or one subjected to prompt injection) can dump all process environment variables after a single benign command approval. Common secrets include
OPENAI_API_KEY,AWS_SECRET_ACCESS_KEY,DATABASE_URL, and any other credentials passed via environment. - Misleading consent UI: The console prompt displays specific arguments and uses language ("this tool") that implies per-invocation consent, but the system grants session-wide blanket approval.
- No expiration or scope: The approval cache uses a
ContextVarthat persists for the entire agent execution context with no timeout, no command-count limit, and no clearing between tool calls. - No environment filtering:
os.environ.copy()passes every environment variable to subprocesses without filtering sensitive patterns.
The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.
CVE-2026-56074 has a CVSS score of 5.5 (Medium). The vector is requires local access, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.5.128); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-56074? CVE-2026-56074 is a medium-severity incorrect authorization vulnerability in praisonaiagents (pip), affecting versions < 4.5.128. It is fixed in 4.5.128. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
- How severe is CVE-2026-56074? CVE-2026-56074 has a CVSS score of 5.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of praisonaiagents are affected by CVE-2026-56074? praisonaiagents (pip) versions < 4.5.128 is affected.
- Is there a fix for CVE-2026-56074? Yes. CVE-2026-56074 is fixed in 4.5.128. Upgrade to this version or later.
- Is CVE-2026-56074 exploitable, and should I be worried? Whether CVE-2026-56074 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-56074 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-56074? Upgrade
praisonaiagentsto 4.5.128 or later.