CVE-2026-47103

python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103)

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.

Vulnerability Intelligence

Public PoC

What is CVE-2026-47103 python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103)?

python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103) (CVE-2026-47103) maps to the Execution and Persistence and Privilege Escalation tactics — the adversary is trying to run malicious code in MITRE ATT&CK.

This page provides production-ready detection logic for python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Microsoft Sentinel, Azure Monitor. 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 Persistence Privilege Escalation
Microsoft Sentinel / Defender
kusto
let vulnerable_import = dynamic(['statemachine', 'python_statemachine', 'StateMachine']);
DeviceProcessEvents
| where FileName in~ ('python.exe', 'python3', 'python3.exe', 'uvicorn', 'gunicorn', 'uwsgi', 'flask', 'fastapi')
    or InitiatingProcessFileName in~ ('python.exe', 'python3', 'python3.exe')
| where ProcessCommandLine has_any ('statemachine', 'scxml', '.scxml')
    or ProcessCommandLine matches regex @'(?i)(eval|exec).*scxml'
| union (
    DeviceFileEvents
    | where FileName endswith '.scxml'
    | where ActionType in ('FileCreated', 'FileModified')
)
| union (
    DeviceNetworkEvents
    | where InitiatingProcessFileName in~ ('python.exe', 'python3', 'python3.exe')
    | where RemotePort !in (80, 443, 8080, 8443)
    | where InitiatingProcessCommandLine has_any ('statemachine', 'scxml')
)
| extend RiskScore = case(
    ProcessCommandLine matches regex @'(?i)(subprocess|os\.system|__import__|exec|eval|base64)', 90,
    ProcessCommandLine has '.scxml', 60,
    40
)
| where RiskScore >= 40
| project TimeGenerated, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessCommandLine, RemoteIP, RemotePort, RiskScore
| sort by RiskScore desc, TimeGenerated desc

Detects execution patterns consistent with exploitation of CVE-2026-47103: Python processes loading statemachine libraries, creation or modification of SCXML files, suspicious eval/exec patterns in Python command lines, and unexpected outbound network from statemachine-associated Python processes.

critical severity medium confidence

Data Sources

Microsoft Defender for Endpoint Microsoft Sentinel Azure Monitor

Required Tables

DeviceProcessEvents DeviceFileEvents DeviceNetworkEvents

False Positives

  • Legitimate applications using python-statemachine with developer-supplied SCXML files for workflow automation
  • CI/CD pipelines running python-statemachine unit tests with SCXML fixtures
  • Data science environments where multiple Python subprocesses are spawned as normal workflow
  • Application health-check scripts that spawn Python processes regularly

Sigma rule & cross-platform mapping

The detection logic for python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103) (CVE-2026-47103) 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:


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