The vulnerability analysis identified a Server-Side Request Forgery (SSRF) issue in the /api/v1/fetch-links endpoint of the Flowise application. The root cause was the lack of URL validation when the server-side fetch API was used to retrieve content from user-provided URLs.
The investigation started by analyzing the provided vulnerability details, which pointed to specific code paths in the FlowiseAI/Flowise repository. By comparing the last vulnerable version (3.0.5) with the first patched version (3.0.6), I identified the fixing commit e002e617df6177cb603c8c569d224bce5fb96b33.
The commit's patch introduced two new security functions, secureFetch and checkDenyList, and applied them to the vulnerable code paths.
The analysis of the patch revealed three key functions involved in the vulnerability:
xmlScrape (packages/components/src/utils.ts): This function's direct use of fetch(currentURL) was replaced with secureFetch(currentURL), confirming it as a sink for the SSRF.webCrawl (packages/components/src/utils.ts): This function, and the crawl helper it calls, also used an unrestricted fetch. The patch added a checkDenyList validation at the start of webCrawl and replaced fetch with secureFetch within the crawl function, indicating it was a primary vulnerable path.getAllLinks (packages/server/src/services/fetch-links/index.ts): This service-layer function acts as the entry point for the vulnerable logic, taking the user's URL and dispatching it to either webCrawl or xmlScrape. The patch added a checkDenyList call here as a defense-in-depth measure.These three functions would appear in a runtime profile or stack trace during an exploit. An attacker would send a request to the /api/v1/fetch-links endpoint, which would trigger the getAllLinks service, and subsequently either webCrawl or xmlScrape, causing the server to make a malicious request to an internal resource.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| flowise | npm | = 3.0.5 | 3.0.6 |
Ongoing coverage of React2Shell