PT-2026-67930 · Npm · Flowise
Published
2026-08-04
·
Updated
2026-08-04
CVSS v4.0
9.2
Critical
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N |
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
typescript
// 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:typescript
// Remove from WHITELIST URLS in constants.ts
// Add authentication check in the route handlerCredits
- Shinobi Security - https://github.com/shinobisecurity
Fix
Information Disclosure
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Flowise