{"id":"CVE-2026-47103","kind":"vulnerability","aliases":["CVE-2026-47103","GHSA-v4jc-pm6r-3vj8"],"related":[],"title":"python-statemachine SCXML <data expr> Eval Injection","description":"### 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.","summary":"python-statemachine evaluates the expr attribute of SCXML data elements with Python's eval() without any restriction. An attacker who can supply SCXML content to SCXMLProcessor can run arbitrary Python code inside the host process.","severity":"critical","cvss":9.8,"epss":0.01363,"exploited":false,"exploited_at":null,"products":[{"name":"python-statemachine","fixed":["3.2.0"],"affected":">= 3.0.0, < 3.2.0","ecosystem":"pypi"},{"name":"fgmacedo python statemachine","fixed":["3.2.0"],"affected":">= 3.0.0, < 3.2.0","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["cwe-94","cwe-95","package","python","python-statemachine","scxml"],"not_affected_if":["no-scxml-input","trusted-scxml-only"],"how_to_check":"- Run `pip show python-statemachine` and check whether the version is at least `3.2.0`.\n- Search your code for `SCXMLProcessor` and check whether any SCXML input comes from users, uploads, configuration or plugins.","fix":"- python-statemachine: move to `3.2.0`","status":"open","published_at":"2026-06-17T15:16:58+00:00","first_seen_at":"2026-11-16T16:08:24+00:00","triaged_at":"2026-11-16T16:08:48+00:00","updated_at":"2026-11-16T16:38:06+00:00","category":"package","confidence":0.9,"triage":{"at":"2026-11-16T16:08:48Z","model":"claude-haiku-5-5","output":{"fix":"- python-statemachine: move to `3.2.0`","reach":"unknown","title":"python-statemachine: SCXML data expressions run arbitrary Python code via eval","impact":"high","summary":"python-statemachine evaluates the expr attribute of SCXML data elements with Python's eval() without any restriction. An attacker who can supply SCXML content to SCXMLProcessor can run arbitrary Python code inside the host process.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","python-statemachine","scxml"],"confidence":0.9,"fix_status":"available","needs_auth":"unknown","worst_case":"arbitrary code runs in the hosting Python process","analyst_note":"","how_to_check":"- Run `pip show python-statemachine` and check whether the version is at least `3.2.0`.\n- Search your code for `SCXMLProcessor` and check whether any SCXML input comes from users, uploads, configuration or plugins.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["no-scxml-input","trusted-scxml-only"],"who_is_affected":"Applications that load SCXML documents with SCXMLProcessor and feed it content an attacker can influence, such as remote requests, uploaded files, configuration or plugins. Applications that only use the state machine API without SCXML input, or that load only trusted SCXML files they control, are not exposed by this flaw.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000782,"input_tokens":5122,"output_tokens":540,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':8A,16A '-47103':9A,17A '-94':25B '-95':27B,210C '1':157C '2':165C '3':171C '3.1.2':74C,164C '3vj8':14A '4':180C '5':188C 'accept':222C 'action':132C 'applic':85C,221C 'arbitrari':63B,98C 'attack':53B,89C 'attacker-control':88C 'attribut':40B,76C,119C 'built':144C 'built-in':143C 'call':123C,140C,186C 'callabl':133C,136C 'chain':124C 'chart':178C 'code':65B,99C,214C 'configur':230C 'consum':220C 'contain':170C 'content':58B,92C,224C 'context':103C 'control':90C 'creat':130C,134C,166C 'cve':7A,15A 'cwe':24B,26B,209C 'data':43B,176C,190C,195C 'dataitem':135C 'datamodel':131C 'definit':129C 'depend':216C 'detail':108C 'direct':147C 'document':79C,114C 'element':44B,117C 'eval':5A,48B,83C,137C,138C,139C,146C,184C,187C,206C 'evalu':37B,75C,116C 'execut':100C,215C 'expr':39B,118C,177C 'express':150C 'fals':194C 'fgmacedo':21A 'file':111C,127C,169C,175C,229C 'follow':122C 'ghsa':11A 'ghsa-v4jc-pm6r-3vj8':10A 'host':68B,106C 'impact':202C 'inject':6A,207C 'insid':66B 'instal':158C,160C 'local':213C 'marker':191C,196C 'packag':28B 'pass':87C 'pip':159C 'plugin':231C 'pm6r':13A 'poc':156C 'process':69B,107C,112C 'python':2A,19A,22A,29B,31B,35B,46B,64B,72C,81C,141C,162C 'python-statemachin':1A,30B,34B,71C,161C 'python-statemachine':18A 'reach':183C 'remot':211C,226C 'restrict':51B,155C 'result':189C 'run':62B,172C 'sandbox':153C 'scxml':4A,33B,42B,57B,78C,91C,110C,113C,126C,168C,174C,223C 'scxmlprocessor':60B,94C 'scxmlprocessor.parse':109C,125C,173C 'scxmlprocessor.process':128C 'scxmlprocessor.start':179C 'sourc':235C 'start':182C,193C,198C 'statemachin':3A,32B,36B,73C,163C 'statemachine':20A,23A 'string':151C 'success':200C 'summari':70C 'suppli':56B 'true':199C,201C 'untrust':234C 'upload':228C 'use':80C 'user':227C 'v4jc':12A 'via':120C 'vulner':96C,208C 'whether':218C 'without':49B,152C","nicknames":[],"mitigations":[],"who_affected":"Applications that load SCXML documents with SCXMLProcessor and feed it content an attacker can influence, such as remote requests, uploaded files, configuration or plugins. Applications that only use the state machine API without SCXML input, or that load only trusted SCXML files they control, are not exposed by this flaw.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["fgmacedopythonstatemachine","pythonstatemachine"],"ptokens":["fgmacedo","python","statemachine"],"labels":["critical","cwe94","cwe95","package","pypi","python","pythonstatemachine","scxml","vendor"],"campaign_type":null,"search_a":"'-2026':8A,16A '-47103':9A,17A '3vj8':14A 'cve':7A,15A 'eval':5A 'fgmacedo':21A 'ghsa':11A 'ghsa-v4jc-pm6r-3vj8':10A 'inject':6A 'pm6r':13A 'python':2A,19A,22A 'python-statemachin':1A 'python-statemachine':18A 'scxml':4A 'statemachin':3A 'statemachine':20A,23A 'v4jc':12A","search_b":"'-94':25B '-95':27B 'arbitrari':63B 'attack':53B 'attribut':40B 'code':65B 'content':58B 'cwe':24B,26B 'data':43B 'element':44B 'eval':48B 'evalu':37B 'expr':39B 'host':68B 'insid':66B 'packag':28B 'process':69B 'python':29B,31B,35B,46B,64B 'python-statemachin':30B,34B 'restrict':51B 'run':62B 'scxml':33B,42B,57B 'scxmlprocessor':60B 'statemachin':32B,36B 'suppli':56B 'without':49B","search_c":"'-95':210C '1':157C '2':165C '3':171C '3.1.2':74C,164C '4':180C '5':188C 'accept':222C 'action':132C 'applic':85C,221C 'arbitrari':98C 'attack':89C 'attacker-control':88C 'attribut':76C,119C 'built':144C 'built-in':143C 'call':123C,140C,186C 'callabl':133C,136C 'chain':124C 'chart':178C 'code':99C,214C 'configur':230C 'consum':220C 'contain':170C 'content':92C,224C 'context':103C 'control':90C 'creat':130C,134C,166C 'cwe':209C 'data':176C,190C,195C 'dataitem':135C 'datamodel':131C 'definit':129C 'depend':216C 'detail':108C 'direct':147C 'document':79C,114C 'element':117C 'eval':83C,137C,138C,139C,146C,184C,187C,206C 'evalu':75C,116C 'execut':100C,215C 'expr':118C,177C 'express':150C 'fals':194C 'file':111C,127C,169C,175C,229C 'follow':122C 'host':106C 'impact':202C 'inject':207C 'instal':158C,160C 'local':213C 'marker':191C,196C 'pass':87C 'pip':159C 'plugin':231C 'poc':156C 'process':107C,112C 'python':72C,81C,141C,162C 'python-statemachin':71C,161C 'reach':183C 'remot':211C,226C 'restrict':155C 'result':189C 'run':172C 'sandbox':153C 'scxml':78C,91C,110C,113C,126C,168C,174C,223C 'scxmlprocessor':94C 'scxmlprocessor.parse':109C,125C,173C 'scxmlprocessor.process':128C 'scxmlprocessor.start':179C 'sourc':235C 'start':182C,193C,198C 'statemachin':73C,163C 'string':151C 'success':200C 'summari':70C 'true':199C,201C 'untrust':234C 'upload':228C 'use':80C 'user':227C 'via':120C 'vulner':96C,208C 'whether':218C 'without':152C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-06-17T11:39:45+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-v4jc-pm6r-3vj8","url":"https://github.com/advisories/GHSA-v4jc-pm6r-3vj8","severity":"critical","published_at":"2026-06-18T14:28:02+00:00","modified_at":"2026-11-16T16:08:19+00:00","first_seen_at":"2026-11-16T16:08:24+00:00","fetched_at":"2026-11-16T16:17:15+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-47103","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47103","severity":null,"published_at":"2026-06-17T15:16:58+00:00","modified_at":"2026-10-26T12:10:00+00:00","first_seen_at":"2026-11-16T16:38:06+00:00","fetched_at":"2026-11-16T16:38:06+00:00","note":null}],"documents":[{"id":171026,"url":"https://api.github.com/repos/fgmacedo/python-statemachine/security-advisories/GHSA-v4jc-pm6r-3vj8","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":171027,"url":"https://github.com/fgmacedo/python-statemachine/security/advisories/GHSA-v4jc-pm6r-3vj8","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-06-17T11:39:45+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":171028,"url":"https://github.com/fgmacedo/python-statemachine/releases/tag/v3.2.0","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":171357,"url":"https://www.vulncheck.com/advisories/python-statemachine-rce-via-scxml-eval-injection","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.01363,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-47103"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}