Apache DolphinScheduler: DataSource API Missing Authorization Check Leads to Arbitrary Data Source Metadata Disclosure
Description
DataSource API Missing Authorization Check Leads to Arbitrary Data Source Metadata Disclosure in Apache DolphinScheduler.
This issue affects Apache DolphinScheduler: before 3.4.2.
Users are recommended to upgrade to version 3.4.2, which fixes the issue.
Affected products
1- Range: <3.4.2
Patches
Vulnerability mechanics
Root cause
"Missing authorization checks in API service methods allow authenticated users to access or manipulate resources (workflow instances, task definitions, data source metadata) belonging to other projects without proper permission verification."
Attack vector
An authenticated attacker can exploit the missing authorization checks by sending crafted HTTP requests to the affected API endpoints. For example, calling `/executors/start-workflow-instance` with a `projectCode` belonging to another project triggers a workflow in that project without permission. Similarly, calling `/workflow-instances/{id}/view-variables` or `/workflow-instances/{id}/view-gantt` with an arbitrary `projectCode` discloses workflow instance details. The data source endpoints (`/datasources/{id}/connection-test`, `/datasources/tables`, `/datasources/tableColumns`, `/datasources/databases`) accept a `datasourceId` parameter and return metadata without verifying the user's authorization on that data source. No special privileges beyond a valid session are required.
Affected code
The vulnerability spans multiple controllers and service implementations in the Apache DolphinScheduler API layer. In `ExecutorController` and `ExecutorServiceImpl`, the `triggerWorkflowDefinition` and `backfillWorkflowDefinition` methods lacked a project authorization check, allowing any authenticated user to trigger workflows in projects they do not own. Similarly, `WorkflowInstanceServiceImpl`'s `viewVariables` and `viewGantt` methods did not verify the caller's permission on the project before returning instance details. `TaskDefinitionServiceImpl.deleteByCodeAndVersion` failed to confirm that the task definition's `projectCode` matched the caller's project, enabling cross-project deletion. Finally, `DataSourceController` endpoints (`connectionTest`, `getDatabases`, `getTables`, `getTableColumns`) and the underlying `DataSourceServiceImpl` methods omitted permission checks, allowing any authenticated user to probe metadata of any data source.
What the fix does
Each patch inserts an authorization gate before the sensitive operation. For workflow endpoints, `projectService.checkProjectAndAuthThrowException` is called with the login user, project code, and the required permission identifier (`RERUN` or `WORKFLOW_INSTANCE`). The `ExecutorServiceImpl` also verifies that the resolved workflow definition's `projectCode` matches the URL's `projectCode`, rejecting cross-project requests. For task definition deletion, the patch adds a check that `projectCode != taskDefinition.getProjectCode()`, returning `TASK_DEFINE_NOT_EXIST` on mismatch. For data source endpoints, `canOperatorPermissions` is invoked with `AuthorizationType.DATASOURCE` and the datasource ID, throwing `USER_NO_OPERATION_PERM` if the user lacks access. These changes ensure that every API call is scoped to the authenticated user's authorized projects and data sources.
Preconditions
- authThe attacker must have a valid authenticated session (any authenticated user).
- inputThe attacker must know or guess the target projectCode, workflowInstanceId, taskCode, or datasourceId.
Generated on Jun 17, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
1- lists.apache.org/thread/4f1fojpj26z9y5nd1ko845gcknpn75g2mitrevendor-advisory
News mentions
0No linked articles in our index yet.