CVE-2026-47103

Python StateMachine 3.0.0 < 3.2.0 RCE via SCXML eval() Injection

Published Jun 17, 2026 CVSS 4.0 · 9.3 Critical EPSS 1.4% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Python StateMachine 3.x processes SCXML documents that include <data expr="..."> attributes. In affected versions, the expression string is passed directly to Python's eval() without sanitization. This allows an attacker to embed arbitrary Python code in a malicious SCXML file, leading to remote code execution in the context of the hosting application. The weakness is an unsafe expression evaluation, mapped to CWE‑94 and CWE‑95.

Affected Systems

The vulnerability exists in the open-source Python library python‑statemachine maintained by fgmacedo. Users who are running versions 3.0.0 through 3.1.x are affected. Versions 3.2.0 and later mitigate the flaw.

Risk and Exploitability

The CVSS score of 9.3 indicates a critical vulnerability that allows arbitrary code execution within the hosting process. Based on the description, it is inferred that the attack vector would be an attacker who can supply a crafted SCXML document to an application that processes SCXML, such as via file upload, configuration, or network message. The EPSS score is about 1.17%, indicating a low current exploitation probability. The lack of a KEV listing suggests no publicly known exploit has been observed. Arbitrary code execution could compromise confidentiality, integrity, and availability in the context of the hosting process, especially if the process runs with elevated privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade python‑statemachine to version 3.2.0 or later, which removes the unsafe eval path.
  • Disallow SCXML documents from untrusted sources or replace the eval call with a safe parser, ensuring that only trusted data expr values are accepted.
  • If upgrading is not immediately possible, audit the application’s SCXML handling code to sandbox or eliminate the eval usage and validate all input before processing.

Generated by OpenCVE AI on August 13, 2026 at 20:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v4jc-pm6r-3vj8 python-statemachine SCXML <data expr> Eval Injection
History
Type Values Removed Values Added
First Time appeared Fgmacedo python Statemachine
CPEs cpe:2.3:a:fgmacedo:python_statemachine:*:*:*:*:*:python:*:*
Vendors & Products Fgmacedo python Statemachine
Type Values Removed Values Added
First Time appeared Fgmacedo
Fgmacedo python-statemachine
Vendors & Products Fgmacedo
Fgmacedo python-statemachine
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Python StateMachine 3.0.0 < 3.2.0 RCE via SCXML eval() Injection
Weaknesses CWE-95
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:04 PM
Reserved
May 18, 2026, 7:22 PM
Status
Modified
Published
Jun 17, 2026, 3:16 PM
Modified
Oct 26, 2026, 12:10 PM