langgenius/dify version 0.10.1 contains a Server-Side Request Forgery (SSRF) vulnerability in the test functionality for the Create Custom Tool option via the REST API POST /console/api/workspaces/current/tool-provider/api/test/pre
. Attackers can set the url
in the servers
dictionary in OpenAIs schema with arbitrary URL targets, allowing them to abuse the victim servers credentials to access unauthorized web resources.
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.