Summary
BISHENG versions before 3.0.0 have workflow routes that lack authentication, allowing unauthenticated callers to invoke or stop workflows. If an attacker knows a workflow UUID and can override a Code node's code parameter, the workflow may execute attacker-supplied Python as the administrator.
Affected context
The issue affects BISHENG deployments before 3.0.0 where the /api/v2/workflow/invoke or /api/v2/workflow/stop routes are reachable without authentication. Invoking a workflow may permit a caller who knows its UUID to provide an override for a Code node's code parameter; that code is passed to exec(). The stop route may also allow interference with other users' workflow sessions.
Exploit preconditions
- Attack surface: The workflow invoke and stop API routes must be reachable by the attacker.
- Required access: The routes do not require authentication; the attacker must know a target workflow UUID to invoke it.
- Trigger point: A request to invoke or stop a workflow.
- Why exploitation is possible: Missing authentication permits requests without identity checks, and an invocation can pass an override to a Code node whose code parameter is executed with
exec().
Why this happens
The API routes do not enforce authentication before performing workflow operations, which maps to CWE-306: Missing Authentication for Critical Function. In the invocation path, accepting an override for a Code node and passing its code parameter to exec() can turn caller-controlled input into code execution. A workflow UUID identifies a workflow but should not serve as proof of authorization.
Potential impact
- An attacker may execute Python code with the privileges of the workflow process.
- Administrative execution context may allow broader access to application data or resources.
- Workflow sessions belonging to other users could be stopped or disrupted.
- Compromised workflows could affect connected systems, depending on the deployment's permissions and integrations.
General mitigation guidance
Defensive patterns include:
- Require authentication on every workflow operation and authorize users for the specific workflow and action.
- Treat workflow identifiers as references, not as credentials or authorization tokens.
- Avoid executing caller-controlled code; use constrained, predefined operations instead of dynamic
exec()behavior. - Validate and restrict workflow overrides against a strict schema and trusted values.
- Run workflow workers with least privilege and limit their access to host resources, credentials, and connected services.
- Apply consistent access-control checks to both workflow invocation and session-stopping operations.
How teams detect issues like this
Review route handlers and middleware for authentication and per-workflow authorization checks, especially on invoke and stop operations. Use static analysis and code review to identify exposed routes, caller-controlled overrides, and dynamic execution sinks such as exec(). Audit access logs for unauthenticated workflow requests, unexpected overrides, and stop operations affecting unrelated sessions. Policy checks can require authentication and authorization coverage for sensitive API routes.

