Summary
Heym versions before 0.0.21 contain an authorization bypass in the workflow execution engine that lets authenticated users execute workflows they do not own by referencing victim workflow UUIDs.
By crafting workflows with execute nodes or agent subWorkflowIds that point to another user's workflow UUIDs, attackers can cause those workflows to run under attacker-controlled execution paths, exposing outputs and triggering unintended side effects.
Affected context
This vulnerability occurs in Heym's workflow orchestration and execution layer where workflows are identified and linked via UUIDs.
It becomes relevant in deployments where:
- Multiple users or tenants share a Heym instance
- Workflows are addressable by stable UUIDs
- The system trusts that any authenticated caller referencing a workflow UUID is authorized to execute it
The issue manifests when the platform fails to re-check ownership or access rights for referenced workflow UUIDs during workflow composition and runtime execution.
Exploit preconditions
- Attack surface: Application-level workflow APIs (e.g., workflow creation, editing, and execution endpoints).
- Required access: Valid authenticated user account on the Heym instance (no elevated privileges necessarily required).
- Trigger point:
- Creating or updating a workflow that includes:
- Execute nodes referencing a victim workflow UUID, or
- Agent subWorkflowIds pointing to a victim workflow UUID.
- Initiating execution of the attacker-controlled workflow.
- Why exploitation is possible: The platform validates that the attacker can execute their own workflow, but does not consistently validate that they are authorized to execute the referenced workflow UUIDs embedded inside nodes or agent configurations. As a result, the authorization boundary is bypassed through indirect invocation.
Why this happens
The underlying issue is an improper authorization check on indirect workflow references, aligning with CWE-863: Incorrect Authorization.
The system enforces access control at the entry point (the workflow the user directly runs) but does not re-apply authorization checks to:
- Child workflows referenced by execute nodes, or
- Sub-workflows referenced by agent subWorkflowIds.
This creates a confused-deputy pattern where the workflow engine, acting with full access to referenced workflows, runs victim workflows on behalf of an attacker solely because they supplied a valid UUID. The core insecure pattern is trusting identifiers embedded in attacker-controlled configuration without validating that the caller is authorized to operate on the referenced resource.
Potential impact
- Unauthorized execution of victim workflows under attacker-controlled execution paths.
- Exposure of victim workflow outputs, including potentially sensitive data processed or produced by those workflows.
- Triggering side-effectful nodes (e.g., external API calls, database writes, notifications) in victim workflows without the owner's consent.
- Abuse of victim workflows as privileged automation to perform actions the attacker could not directly perform.
- Lateral movement across tenant boundaries in multi-tenant deployments if workflows cross organizational or user isolation boundaries.
General mitigation guidance
Mitigations should focus on strict, consistent authorization checks for all workflow references and reducing trust in user-supplied identifiers:
- Enforce per-resource authorization when resolving workflow UUIDs, regardless of how they are referenced (direct execution, execute nodes, subWorkflowIds, or other linkages).
- Treat workflow UUIDs provided in user-controlled configurations as untrusted data; validate ownership or access rights before resolution and execution.
- Introduce clear tenancy or ownership boundaries in the workflow model, ensuring that cross-tenant workflow references are either prohibited or require explicit shared access grants.
- Prefer design patterns where workflows call other workflows through controlled, policy-governed interfaces (e.g., named, permission-checked services) rather than raw UUID references.
- Apply least-privilege to workflow engine contexts, limiting the default execution scope so that workflows cannot freely trigger all other workflows by identifier alone.
How teams detect issues like this
Detection efforts can focus on both code-level and runtime behaviors:
- Static analysis / code review:
- Look for workflow resolution logic that accepts workflow IDs from user input (HTTP body, query parameters, stored configs) without explicit access checks.
- Identify paths where execute nodes, subWorkflowIds, or similar constructs are resolved to workflows using only existence checks rather than ownership/permission checks.
- Review authorization middleware or policy enforcement layers to confirm that they are applied not just at the top-level execution request, but also on internal resolution of linked workflows.
- Policy and configuration analysis:
- Implement rules that flag cross-owner or cross-tenant workflow references unless a documented sharing mechanism exists.
- Use schema or configuration validation to restrict referencing of workflows outside allowed scopes.
- Runtime monitoring:
- Log workflow executions with both the caller identity and the owner of each executed workflow; alert on mismatches where a user executes a workflow they do not own and have not been granted access to.
- Monitor for unusual patterns where a single user triggers many workflows belonging to other accounts.
- Automated review tools (e.g., SAST/IAST or custom linters) can be configured to highlight any place where IDs are used to look up workflows or sub-workflows without an accompanying, explicit authorization check.

