Skip to content

Unauthorized Access and Modification of APP Orchestration

High
laipz8200 published GHSA-6pw4-jqhv-3626 Apr 25, 2025

Package

npm https://github.com/langgenius/dify (npm)

Affected versions

<= v0.6.8

Patched versions

None

Description

Summary

A vulnerability was identified in the DIFY where normal users is able to access and modify APP orchestration, even though the web UI of APP orchestration is not presented for normal user. This access control flaw allows non-admin users to make unauthorized access and changes on the APPSs

The purpose of APP orchestration in DIFY AI involves defining and managing workflows, prompts, and integrations that make up an AI application. This orchestration is achieved through a visual interface and the use of Domain-Specific Language (DSL) YAML files, allowing developers to:

  1. Create and manage prompts: Design and refine the prompts that guide AI responses.
  2. Integrate various tools and services: Connect with APIs, databases, and other external services.
  3. Define workflows: Set up the sequence of operations and decision points within an AI application.

Affected endpoint

  • /app/{app.id}/workflow
  • /app/{app.id}/workflow/*

PoC

This access control flaw is not intended by the DIFY design, as only admin users have the access to the APP orchestration (in the WEB UI appearance) but it was found that normal user was able to access the APP orchestration and made modification.

  1. In the normal user Web UI, there is no Orchestration on the APP
    image

  2. Exploited the vulnerability to access the Orchestration of the APP
    image

  3. Even with access, modification, and the ability to publish, the app.
    image

Recommendation

To mitigate this issue, update the access control mechanisms to enforce stricter user role permissions. Normal users shouldn't be access and modify the the Orchestration of the APPs. Implement and review role-based access controls (RBAC) to ensure that only users with admin privileges can access Orchestration of the APPs.

Impact

API Key Theft and Abuse: Unauthorized users can steal embedded API keys, such as those for OpenAI, DALL-E, StableDiffusion, and Judge0 CE leading to misuse and potential financial loss due to unauthorized usage of paid services. A normal user could extract the OpenAI API key and use it to make large numbers of requests, incurring costs for the legitimate owner.

Application Misuse and Data Theft: Users can alter the application's logic to access restricted data, perform unauthorized actions, or exfiltrate sensitive information. Changing the workflow to bypass security checks or retrieve sensitive information from databases.

Service Disruption and Manipulation: Unauthorized modifications can disrupt service functionality, degrade performance, or introduce vulnerabilities. Altering prompts or workflows to introduce infinite loops or trigger excessive resource consumption.

Intellectual Property Theft: Users can export the application's DSL files and replicate proprietary logic or algorithms in their own projects. A competitor could steal a custom AI model's orchestration logic and use it to develop a competing product.

Further Analysis - Threat Research Information – Live Vulnerable Instances on The Internet

We performed threat research analysis on the internet to discover vulnerable live instances, using the HTTP response of the DIFY-AI application as an indicator. Based on the OSINT results from the Censys and Shodan a total 3894 instances were found to be publicly accessible on the internet. They are potentially vulnerable to the number of vulnerabilities that we reported. If performing active reconnaissance on the internet might potentially uncover more instances.

image

image


Finder Credits:
Aden Yap Chuen Zhen, BAE Systems Digital Intelligence (Malaysia) (Github ID: zn9988)
Ali Radzali, BAE Systems Digital Intelligence (Malaysia) (Github ID: H0j3n)

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L

CVE ID

CVE-2025-43862

Weaknesses

Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. Learn more on MITRE.

Credits