Skip to content
DayZeroHub
Critical CVSS 9.3GHSA-v4jc-pm6r-3vj8CVE-2026-47103

python-statemachine: code injection via eval() in SCXML <data expr> attributes

python-statemachine

Summary

python-statemachine evaluates the expr attributes of <data> elements in SCXML documents with eval(), allowing arbitrary code execution if an application processes attacker-controlled SCXML content. The source rates it critical (CVSS 4.0: 9.3) and lists version 3.2.0 as the fixed release.

What happened

The python-statemachine library evaluates the expr attributes of <data> elements in SCXML documents using Python's eval() function, with no sandboxing or restrictions. Any application that passes attacker-controlled SCXML content to SCXMLProcessor may end up executing arbitrary code in the context of the hosting process. The source classifies it as an eval injection (CWE-95, also CWE-94) and identifies it as CVE-2026-47103 / GHSA-v4jc-pm6r-3vj8.

Why it matters

According to the source, the impact can be remote or local code execution, depending on whether the application using the library accepts SCXML from remote users, uploaded files, configuration, plugins, or other untrusted sources. The score is CVSS 4.0: 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), with critical severity. CISA's KEV catalog does not list known exploitation of this vulnerability, and the source does not state active exploitation.

Affected products and versions

python-statemachine (PyPI): versions >= 3.0.0, < 3.2.0. The description explicitly mentions version 3.1.2. Fixed version: 3.2.0.

ProductVersionsFixed in
python-statemachine>= 3.0.0, < 3.2.03.2.0

Action recommended by the source

The source lists 3.2.0 as the fixed version, so the vendor recommends upgrading to that version or later. The source does not describe other mitigations.

Fixed in: 3.2.0

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-94, CWE-95

Relevant change history

  1. Published

    Advisory published.

Summary written with AI assistance from the source data. See the sources and references for complete information. View sources