CVE-2026-47392 IBM QRadar · QRadar

Detect PraisonAI Sandbox Escape via print.__self__ Builtins Leak in execute_code in IBM QRadar

Detects exploitation of CVE-2026-47392, a critical sandbox escape vulnerability in PraisonAI (praisonaiagents <= 1.6.39, PraisonAI <= 4.6.39). The flaw allows attackers to leak the Python builtins module through `print.__self__` within the `execute_code` subprocess mode, bypassing sandbox restrictions and achieving arbitrary code execution on the host. A public proof-of-concept is available.

MITRE ATT&CK

Tactic
Execution Privilege Escalation Lateral Movement

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS EventTime, sourceip, username, "Application", "Command", "Process Name"
FROM events
WHERE LOGSOURCETYPENAME(devicetype) IN ('Microsoft Windows Security Event Log', 'Linux OS', 'SysmonForLinux')
AND (LOWER("Command") LIKE '%praisonai%' OR LOWER("Command") LIKE '%praisonaiagents%')
AND (
  LOWER("Command") LIKE '%print.__self__%'
  OR LOWER("Command") LIKE '%__builtins__%'
  OR LOWER("Command") LIKE '%execute_code%'
  OR (LOWER("Command") LIKE '%subprocess%' AND LOWER("Command") LIKE '%shell%')
)
LAST 7 DAYS
ORDER BY starttime DESC
critical severity medium confidence

QRadar AQL query detecting CVE-2026-47392 exploitation attempts through command-line analysis of PraisonAI process events.

Data Sources

QRadar Windows DSMQRadar Linux OS DSMSysmon DSM

Required Tables

events

False Positives & Tuning

  • Authorized penetration testing activities against PraisonAI deployments with documented scope
  • Developer integration testing environments where sandbox restrictions are intentionally relaxed
  • Security research activities running published PoC for detection validation purposes
  • Legitimate AI agent workflows requiring dynamic code evaluation with subprocess helpers

Other platforms for CVE-2026-47392


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.

  1. Test 1PraisonAI Builtins Leak via print.__self__ in execute_code

    Expected signal: Process spawn: python3 executing praisonaiagents code_tools module; child process executing 'id' command via os.popen; stdout contains 'SANDBOX_ESCAPE_SUCCESS' followed by uid/gid output

  2. Test 2PraisonAI Sandbox Escape to Reverse Shell

    Expected signal: Process tree: python3 -> praisonaiagents -> bash -c 'bash -i' with network connection to 127.0.0.1:4444; network telemetry showing TCP connection from python process

  3. Test 3PraisonAI Sandbox Escape with Credential File Exfiltration

    Expected signal: File open event on /tmp/lab_creds.txt by python process; outbound HTTP POST to 127.0.0.1:8888 from PraisonAI process; process command line contains __builtins__ and os.system invocation

Unlock Pro Content

Get the full detection package for CVE-2026-47392 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections