CVE-2025-26319 is a critical vulnerability affecting FlowiseAI Flowise versions up to and including 2.2.6.

This vulnerability allows attackers to perform arbitrary file uploads, potentially leading to remote code execution, server compromise, and unauthorized access to sensitive data.

Vulnerability Overview

  • Impact: The vulnerability is classified as high severity due to its potential for unauthorized file uploads and execution. It affects the /api/v1/attachments endpoint, which lacks proper validation of user-supplied parameters.
  • Exploitation: Attackers can exploit this vulnerability by crafting malicious requests to bypass security checks and upload files to arbitrary locations on the server. This can be achieved without authentication, making it accessible to unauthenticated attackers.

Exploitation Tools And Techniques

  1. Basic File Upload:
    • Tool: flowise_exploit.py
    • Function: Uploads local files to a specified path on the server.
    • Example: python flowise_exploit.py -u http://target:3000 -f local_file.txt -d /path/on/server/file.txt
  2. Config File Upload:
    • Function: Modifies API key configurations by uploading a new configuration file.
    • Example: python flowise_exploit.py -u http://target:3000 -f new_api.json -d /root/.flowise/api.json
  3. Webshell Upload:
    • Function: Automatically generates and uploads webshells for PHP or Node.js.
    • Example:
      • PHP Webshell: python flowise_exploit.py -u http://target:3000 --generate-webshell php --webshell-path /var/www/html/shell.php
      • Node.js Backdoor: python flowise_exploit.py -u http://target:3000 --generate-webshell nodejs --webshell-path /tmp/backdoor.js

The attack exploits the /api/v1/attachments route, which is accessible without authentication. By manipulating the chatId parameter, attackers can perform path traversal (../../../) to upload arbitrary files to any location on the server’s file system.

To mitigate this vulnerability, users should upgrade FlowiseAI Flowise to version 2.2.7 or later.

Additional measures include restricting file uploads, implementing strict file type and size filtering, using allowlists for permitted file extensions, and configuring web application firewall (WAF) rules.

LEAVE A REPLY

Please enter your comment!
Please enter your name here