CVE-2026-47103 Elastic Security · Elastic

Detect python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103) in Elastic Security

CVE-2026-47103 is a critical eval injection vulnerability (CWE-95) in python-statemachine versions >= 3.0.0 and < 3.2.0. When processing SCXML documents, the library evaluates expressions in <data expr=...> elements using Python's eval(), allowing an attacker who can supply or influence SCXML input to execute arbitrary Python code in the context of the application process. A public PoC is available and exploitation requires no authentication when SCXML is parsed from user-controlled input. CVSS score 9.8.

MITRE ATT&CK

Tactic
Execution Persistence Privilege Escalation

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=5m
  [process where event.type == "start"
   and (
     process.name in ("python", "python3", "python3.9", "python3.10", "python3.11", "python3.12")
     or process.parent.name in ("python", "python3")
   )
   and (
     process.command_line like~ "*statemachine*"
     or process.command_line like~ "*.scxml*"
     or process.args_count > 0 and process.command_line like~ "*scxml*"
   )
  ] by process.entity_id
  [any where event.category in ("network", "file")
   and (
     (event.category == "network" and not destination.port in (80, 443, 8080, 8443, 5432, 3306, 6379))
     or (event.category == "file" and file.extension == "scxml")
   )
  ] by process.entity_id
critical severity high confidence

EQL sequence detection correlating Python process startup with statemachine/SCXML references followed by unexpected network connections or SCXML file operations, identifying the full kill chain for CVE-2026-47103 exploitation.

Data Sources

Elastic SecurityElastic AgentAuditbeatWinlogbeat

Required Tables

logs-*endgame-*.ds-logs-endpoint.events.*

False Positives & Tuning

  • Applications with legitimate SCXML-driven workflow engines making internal API calls post-initialization
  • Python microservices that connect to databases or message queues after loading state machine definitions
  • Development environments where SCXML files are created and Python processes connect to local services
  • Monitoring agents that create temporary SCXML files as part of health-check workflows

Other platforms for CVE-2026-47103


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 1Basic SCXML eval injection via python-statemachine

    Expected signal: Process execution of python3 with statemachine and scxml in command line; file creation event for /tmp/cve_2026_47103_pwned by the python3 process; pip install of vulnerable package version

  2. Test 2SCXML eval injection with reverse shell payload

    Expected signal: Python3 process spawning /bin/bash child process with -i flag; outbound TCP connection to 127.0.0.1:4444 (or attacker IP in real scenario) from the python3 process; subprocess.Popen call visible in process tree

  3. Test 3SCXML eval injection via web API endpoint (simulated)

    Expected signal: Flask application process accepting HTTP POST with SCXML content-type; python3 process creating temp .scxml file; file creation event for /tmp/api_pwned; process-level evidence of __import__ string construction via chr() obfuscation

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections