Flowise: Unauthenticated OAuth2 token refresh endpoint returns access tokens — enables token theft for any connected service
Summary
The OAuth2 token refresh endpoint (POST /api/v1/oauth2-credential/refresh/:credentialId) is in WHITELIST_URLS, meaning it requires no authentication. It decrypts the stored credential (containing clientId, clientSecret, refresh_token), sends a refresh request to the configured OAuth provider, and returns the new access_token directly in the response body.
Root Cause
// packages/server/src/routes/oauth2/index.ts:393-402
res.json({
success: true,
message: 'OAuth2 token refreshed successfully',
credentialId: credential.id,
tokenInfo: {
...tokenData, // ← includes access_token!
has_new_refresh_token: !!tokenData.refresh_token,
expires_at: updatedCredentialData.expires_at
}
})
Whitelist entry at packages/server/src/utils/constants.ts:40.
Attack Chain
- Attacker obtains a credential ID (via Finding 2 / public chatflow leak, or enumeration)
- Attacker calls
POST /api/v1/oauth2-credential/refresh/:credentialId(no auth required) - Server decrypts credential, sends refresh request to OAuth provider with user's
client_secret - Server returns the new
access_tokenin the response to the attacker - Attacker uses the token to access the victim's connected service (Google, Microsoft, etc.)
Docker Validation
POST /api/v1/oauth2-credential/refresh/fake-uuid returns {"message":"Credential not found"} (not 401 Unauthorized), proving the endpoint processes the request without authentication.
Impact
- OAuth2 access token theft for any connected service
- Full access to the victim's third-party accounts (Google, Microsoft, GitHub, etc.)
- Client secret transmitted to OAuth provider during refresh
- Can also be used for DoS by exhausting refresh token quota
Suggested Fix
Remove the refresh endpoint from WHITELIST_URLS and require authentication:
// Remove from WHITELIST_URLS in constants.ts
// Add authentication check in the route handler
Credits
- Shinobi Security - https://github.com/shinobisecurity
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | flowise | < 3.1.3 | 3.1.3 |
References
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N- Weakness (CWE)
CWE-200- Platform
- npm
- Package
flowise- Disclosed
- 04.08.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-qgvm-j2hm-6m38 - CC BY 4.0
Vulnerability history: flowise
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 114
- First → latest
- 04.2024 10.2026
- Without a fix
- 16
- Exploited in attacks
- 0
Severity breakdown
- Critical 28
- High 62
- Medium 24
Disclosures per year
- 2024: 11
- 2025: 22
- 2026: 81
-
Flowise: Unauthenticated OAuth2 token refresh endpoint returns access tokens — enables token theft for any connected service this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.