{"id":"CVE-2026-47103","title":"python-statemachine SCXML <data expr> Eval Injection","summary":"python-statemachine SCXML <data expr> Eval Injection","severity":"critical","cvss":9.8,"cwe":["CWE-95"],"vendor":"python-statemachine","product":"python-statemachine","affected":["python-statemachine >= 3.0.0, < 3.2.0"],"patched":["python-statemachine 3.2.0"],"published":"2026-06-18","updated":"2026-06-18","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-v4jc-pm6r-3vj8","references":[{"url":"https://github.com/fgmacedo/python-statemachine/security/advisories/GHSA-v4jc-pm6r-3vj8"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47103"},{"url":"https://github.com/fgmacedo/python-statemachine/releases/tag/v3.2.0"},{"url":"https://www.vulncheck.com/advisories/python-statemachine-rce-via-scxml-eval-injection"},{"url":"https://github.com/advisories/GHSA-v4jc-pm6r-3vj8"}],"tags":["ghsa","pip","exploit-available"],"epss":0.01363,"epssPercentile":0.7056,"ingestedAt":"2026-06-19T03:39:00.826Z","ecosystem":"pip","exploits":{"github":1,"githubRepos":["https://github.com/SaiTeja-Erukude/CVE-2026-47103-python-statemachine-rce"],"checkedAt":"2026-09-23T07:13:13.845Z"},"exploitAvailable":true,"slug":"CVE-2026-47103","body":"## Overview\n\n### 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.\n\n## Affected packages\n\n- `python-statemachine >= 3.0.0, < 3.2.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `python-statemachine 3.2.0`","depth":"abyssal","depthScore":66,"depthScoreParts":{"impact":53.9,"likelihood":0.3,"exploitation":12,"ransomware":0},"changes":[{"seq":4436,"id":"CVE-2026-47103","ts":1788887179105,"field":"exploit_available","old":"false","new":"true"},{"seq":3319,"id":"CVE-2026-47103","ts":1788886298182,"field":"exploit_available","old":"true","new":"false"},{"seq":2174,"id":"CVE-2026-47103","ts":1788882968123,"field":"exploit_available","old":"false","new":"true"},{"seq":1203,"id":"CVE-2026-47103","ts":1788882367362,"field":"exploit_available","old":"true","new":"false"},{"seq":317,"id":"CVE-2026-47103","ts":1788881814256,"field":"exploit_available","old":"false","new":"true"}]}