Detect python-statemachine SCXML <data expr> Eval Injection (CVE-2026-47103) in Sumo Logic CSE
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
Sumo Detection Query
_sourceCategory=* ("statemachine" OR ".scxml" OR "scxml")
| parse regex field=_raw "(?P<command_line>(?:python|python3)[^\n]{0,500})"
| where !isNull(command_line)
| eval suspicious=if(
command_line matches "(?i).*(eval\\(|exec\\(|__import__|subprocess|os\.system|base64\.b64decode).*",
true, false
)
| eval scxml_ref=if(command_line matches "(?i).*(\.scxml|scxml).*", true, false)
| eval statemachine_ref=if(command_line matches "(?i).*(statemachine).*", true, false)
| eval risk=if(suspicious and (scxml_ref or statemachine_ref), "CRITICAL",
if(scxml_ref and statemachine_ref, "HIGH",
if(scxml_ref or statemachine_ref, "MEDIUM", "LOW")))
| where risk in ("CRITICAL", "HIGH")
| count by _sourceHost, risk, suspicious, command_line
| sort by risk asc, _count desc Sumo Logic search correlating Python command lines referencing statemachine or SCXML with dangerous eval/exec patterns. Triages results by computed risk level to highlight likely CVE-2026-47103 exploitation attempts.
Data Sources
Required Tables
False Positives & Tuning
- Application servers logging startup commands that reference statemachine library initialization
- Deployment scripts that echo command lines containing statemachine and subprocess calls for legitimate orchestration
- Test harnesses that log Python invocations including statemachine and subprocess for CI reporting
- Debugging sessions where developers print command lines containing eval or exec for diagnostic purposes
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.
- 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
- 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
- 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
References (5)
- https://github.com/fgmacedo/python-statemachine/security/advisories/GHSA-v4jc-pm6r-3vj8
- https://nvd.nist.gov/vuln/detail/CVE-2026-47103
- https://github.com/fgmacedo/python-statemachine/releases/tag/v3.2.0
- https://www.vulncheck.com/advisories/python-statemachine-rce-via-scxml-eval-injection
- https://github.com/advisories/GHSA-v4jc-pm6r-3vj8
Unlock Pro Content
Get the full detection package for CVE-2026-47103 including response playbook, investigation guide, and atomic red team tests.