PraisonAI AICoder Arbitrary File Write and Command Execution via LLM Tool Calls (CVE-2026-61445)
Detects exploitation of CVE-2026-61445, a critical (CVSS 9.9) arbitrary file write and OS command execution vulnerability in the PraisonAI Python package (praisonai <= 4.6.77). The AICoder tool-call surface allows LLM-driven tool invocations to write files outside the intended working directory (CWE-22 path traversal) and to execute arbitrary shell commands (CWE-78), leading to remote code execution on the host running the agent. This detection surfaces anomalous child-process spawns from the Python interpreter hosting PraisonAI, suspicious file writes to sensitive paths, and traversal sequences in tool-call arguments.
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- pip
- Product
- praisonai
- Versions
- <= 4.6.77
Timeline
- Disclosed
- October 8, 2026
References & Proof of Concept
CVSS
What is CVE-2026-61445 PraisonAI AICoder Arbitrary File Write and Command Execution via LLM Tool Calls (CVE-2026-61445)?
PraisonAI AICoder Arbitrary File Write and Command Execution via LLM Tool Calls (CVE-2026-61445) (CVE-2026-61445) maps to the Execution and Initial Access tactics — the adversary is trying to run malicious code in MITRE ATT&CK.
This page provides production-ready detection logic for PraisonAI AICoder Arbitrary File Write and Command Execution via LLM Tool Calls (CVE-2026-61445), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, DeviceProcessEvents. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Execution Initial Access
let suspiciousChildren = dynamic(["bash","sh","zsh","cmd.exe","powershell.exe","pwsh","nc","ncat","curl","wget","python","python3","base64","chmod"]);
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("python","python3","python.exe","uvicorn","gunicorn")
| where InitiatingProcessCommandLine has_any ("praisonai","aicoder","praisonaiagents")
| where FileName in~ (suspiciousChildren) or ProcessCommandLine has_any ("/etc/cron","authorized_keys","/tmp/","..%2f","../","bash -i","-c ")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, FolderPath
| order by Timestamp desc Finds child processes or sensitive command lines spawned by a Python process running PraisonAI/AICoder, indicating LLM-tool-driven command execution.
Data Sources
Required Tables
False Positives
- Legitimate AICoder tasks that intentionally shell out to build or test tooling
- Developers running PraisonAI interactively who invoke git, curl, or python subprocesses as part of normal agent workflows
- Internal automation harnesses that wrap PraisonAI and spawn helper scripts
Sigma rule & cross-platform mapping
The detection logic for PraisonAI AICoder Arbitrary File Write and Command Execution via LLM Tool Calls (CVE-2026-61445) (CVE-2026-61445) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-61445
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1 PraisonAI AICoder command execution via tool call
Expected signal: Process creation event showing python3 spawning /bin/bash -c with an id command
- Test 2 PraisonAI AICoder arbitrary file write via path traversal
Expected signal: File creation event for a path containing ../ outside the agent working directory
- Test 3 PraisonAI AICoder persistence write to authorized_keys
Expected signal: File write event targeting an authorized_keys path from a Python/PraisonAI process
Response Playbook
Triage
- Confirm the PraisonAI version on the affected host (`pip show praisonai`); versions <= 4.6.77 are vulnerable to CVE-2026-61445.
- Review the parent Python command line and the full set of child processes/file writes to determine whether the activity matches a legitimate agent task or attacker-controlled tool calls.
- Inspect LLM tool-call logs / prompt history for the agent to identify the triggering prompt and any traversal (`../`) or shell payloads in tool arguments.
- Check for files written outside the intended working directory (cron entries, SSH authorized_keys, web roots, startup scripts) around the event timestamp.
Containment
- Isolate the affected host from the network to prevent lateral movement or C2 from any spawned reverse shell.
- Stop/kill the PraisonAI agent process and disable the service or scheduled job that launches it until patched.
- Rotate any credentials, API keys (including LLM provider keys) and tokens accessible to the agent process.
Evidence Collection
- Capture the full process tree, command lines, and timestamps for the Python parent and all descendants.
- Preserve PraisonAI/AICoder application logs, LLM tool-call transcripts, and the offending prompt(s).
- Collect and hash any files written by the agent outside its working directory and any dropped payloads for forensic analysis.
Escalation Criteria
- ! Escalate to IR if evidence shows successful arbitrary command execution (reverse shell, new persistence, credential access).
- ! Escalate if the agent process runs with elevated privileges or on a host with access to production/sensitive data.
- ! Escalate if attacker-controlled file writes landed in persistence locations (cron, systemd, authorized_keys, web roots) or if outbound C2 is observed.
Investigation Guide
Forensic Artifacts
- >
Process creation events linking a Python/PraisonAI parent to shell or network utility children - >
Files written outside the agent working directory (cron, authorized_keys, web roots, startup scripts) - >
PraisonAI/AICoder tool-call transcripts and prompt history showing traversal or command payloads - >
Outbound network connections from the agent host to unexpected destinations
Tuning Guidance
Establish a baseline of expected subprocesses for legitimate AICoder tasks in your environment (e.g., git, test runners, package managers) and allowlist those parent+child combinations. Tighten on traversal tokens and persistence-path writes, which should never appear in normal agent operation. Prioritize alerts where the agent process runs as root/SYSTEM or on internet-facing hosts.
Hunting Queries
Baselines the children and command lines spawned by PraisonAI/AICoder hosts to spot anomalous shell/command execution.
DeviceProcessEvents | where InitiatingProcessCommandLine has_any ("praisonai","aicoder") | summarize count() by FileName, ProcessCommandLine, DeviceName | order by count_ desc index=edr (parent_process="*praisonai*" OR parent_process="*aicoder*") | stats count by host, process_name, process | sort - count Atomic Red Team Tests
Simulates an LLM tool call that causes AICoder to execute an arbitrary shell command, representing the CWE-78 path of CVE-2026-61445.
Command
python3 -c "import subprocess; subprocess.run(['/bin/bash','-c','id > /tmp/praisonai_poc.txt'])" Cleanup
rm -f /tmp/praisonai_poc.txt Expected Telemetry
Process creation event showing python3 spawning /bin/bash -c with an id command
Expected Detection
KQL/SPL/EDR rules flag a shell child process with a -c payload under a Python parent referencing praisonai/aicoder
Simulates the CWE-22 arbitrary file write by writing a file outside the intended working directory using a traversal sequence.
Command
mkdir -p /tmp/aicoder_work && cd /tmp/aicoder_work && python3 -c "open('../../tmp/praisonai_traversal.txt','w').write('poc')" Cleanup
rm -f /tmp/praisonai_traversal.txt; rm -rf /tmp/aicoder_work Expected Telemetry
File creation event for a path containing ../ outside the agent working directory
Expected Detection
Detection flags traversal sequences in tool-call arguments and sensitive-path file writes
Simulates an attacker using the file-write primitive to drop an SSH key into a user's authorized_keys for persistence.
Command
mkdir -p /tmp/poc_home/.ssh && python3 -c "open('/tmp/poc_home/.ssh/authorized_keys','a').write('ssh-ed25519 AAAAC3PoCKEY attacker@poc\n')" Cleanup
rm -rf /tmp/poc_home Expected Telemetry
File write event targeting an authorized_keys path from a Python/PraisonAI process
Expected Detection
Detection flags writes to authorized_keys/persistence paths originating from the agent host