A Cross-Origin Resource Sharing (CORS) misconfiguration vulnerability exists in Dify v1.9.1 in the /console/api/system-features endpoint. The endpoint implements an overly permissive CORS policy that reflects arbitrary Origin headers and sets Access-Control-Allow-Credentials: true, allowing any external domain to make authenticated cross-origin requests. NOTE: the Supplier disputes this, providing the rationale of "sending requests with credentials does not provide any additional access compared to unauthenticated requests."
The vulnerable endpoint implements a CORS policy that dynamically reflects the value of the Origin header sent by the client, instead of restricting it to trusted domains. At the same time, the response contains the Access-Control-Allow-Credentials: true header, which allows the browser to include session cookies or other authentication data in the request. In practice, this means that a malicious website can trick a logged-in user into visiting it, and then execute authenticated requests on their behalf to the Dify instance. The vendor questions the severity of the vulnerability, arguing that requests with authentication credentials do not provide access to resources inaccessible to unauthenticated users.
An attacker who tricks a logged-in user into visiting a malicious website can execute authenticated requests on their behalf to the Dify panel, potentially gaining access to sensitive configuration data or system functions. The scope of an effective attack is disputed and depends on the actual access control mechanisms on the remaining endpoints.
Apply patches available from the vendor according to references. As a workaround, it is recommended to configure a CORS policy with an explicit whitelist of trusted domains instead of dynamically reflecting the Origin header, and also consider removing the Access-Control-Allow-Credentials: true header for public endpoints or limiting it only to trusted sources.
Langgenius Dify v1.9.1 — /console/api/system-features endpoint
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NLanggenius Dify
APPLanggenius1.9.1
Related vulnerabilities
Domyślne dane uwierzytelniające PostgreSQL w Langgenius Dify
Błędna konfiguracja CORS w Dify — endpoint /console/api/setup
Dify v1.9.1 is vulnerable to Insecure Permissions. An unauthenticated attacker can directly send HTTP GET requ...
langgenius/dify versions 1.1.0 to 1.1.2 are vulnerable to unsanitized input in the code node, allowing executi...
Dify is an open-source LLM app development platform. Prior to version 0.6.12, a normal user is able to access ...