CVE-2026-47103·Python vulnerability
Python StateMachine versions 3.0.0 before 3.2.0 contains a remote code execution vulnerability that allows attackers to execute arbitrary code by supplying malicious SCXML documents containing crafted `<data expr="...">` attributes evaluated unsafely. The SCXMLProcessor passes attacker-controlled expression strings through a call chain ending in Python's built-in eval() without sandboxing, enabling arbitrary code execution in the context of the hosting process.
- Severity
- critical
- Software
- Python
- Fixed in
- 3.2.0
- Published
- 2026-06-17
Affected versions
From: 3.0.0
Until: 3.2.0
Fixed in: 3.2.0
How to fix this CVE
Upgrade Python StateMachine to version 3.2.0 or later to remediate the unsafe expression evaluation vulnerability in SCXML document processing. Organizations using versions 3.0.0 through 3.1.x must prioritize this update as it eliminates the direct eval() call that allows arbitrary code execution when processing untrusted state machine definitions. Verify the update completion by confirming the installed version matches or exceeds 3.2.0.
sudo dnf update python3-statemachineDefensia detects this vulnerability
WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
If SCXML documents are accepted via HTTP endpoints, implement strict XML schema validation that rejects `<data>` elements with `expr` attributes before parsing. Additionally, restrict SCXML processing to pre-approved static state machine definitions and reject dynamic SCXML generation from user input.How to check if you are affected
- Check installed StateMachine version: python3 -c "import statemachine; print(statemachine.__version__)"
- Identify SCXML files in your application: find /path/to/app -name '*.scxml' -type f | head -20
- Search application logs for SCXMLProcessor initialization errors: grep -r 'SCXMLProcessor\|<scxml' /var/log/ --include='*.log' | grep -i error
- Verify remediation: python3 -c "import statemachine; print('Version:', statemachine.__version__); exit(0 if statemachine.__version__ >= '3.2.0' else 1)"
FAQ
What is CVE-2026-47103?
This vulnerability exists in Python StateMachine's SCXML processor, which unsafely evaluates expressions embedded in `<data expr="...">` XML attributes using Python's eval() function. An attacker can craft malicious SCXML documents that execute arbitrary Python code when processed by an affected application.
Is CVE-2026-47103 being actively exploited?
No, this vulnerability is not currently listed on the CISA KEV catalog and no public exploits have been disclosed, though the attack requires no user interaction and impacts any system processing untrusted SCXML input.
What versions of Python StateMachine are affected by CVE-2026-47103?
All versions from 3.0.0 through 3.1.x are vulnerable. Version 3.2.0 and later have patched the unsafe eval() implementation.
How do I check if my server is vulnerable to CVE-2026-47103?
Run `python3 -c "import statemachine; print(statemachine.__version__)"` and compare against 3.2.0. If the version is below 3.2.0, the system is vulnerable.
Does Defensia detect CVE-2026-47103?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Python StateMachine is installed on a monitored server, CVE-2026-47103 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/fgmacedo/python-statemachine/releases/tag/v3.2.0
- https://github.com/fgmacedo/python-statemachine/security/advisories/GHSA-v4jc-pm6r-3vj8
- https://www.vulncheck.com/advisories/python-statemachine-rce-via-scxml-eval-injection
- https://github.com/fgmacedo/python-statemachine/security/advisories/GHSA-v4jc-pm6r-3vj8
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-47103. Free for 1 server.
Get started free