{"id":"CVE-2026-70478","aliases":["CVE-2026-70478","GHSA-qgvm-j2hm-6m38"],"related":[],"kind":"vulnerability","state":"published","title":"Flowise: Unauthenticated OAuth2 token refresh endpoint returns access tokens — enables token theft for any connected service","summary":"Flowise is a drag & drop user interface to build a customized large language model flow. Prior to 3.1.3, the POST /api/v1/oauth2-credential/refresh/:credentialId endpoint is included in WHITELIST_URLS and requires no authentication. The endpoint decrypts the stored credential, sends a refresh request to the configured OAuth provider with the client secret and refresh token, and returns the refreshed access_token in the response body. An attacker with a credential ID can use the token to access the victim's connected service and can also exhaust refresh-token quota. This issue is fixed in 3.1.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Flowise is a drag & drop user interface to build a customized large language model flow. Prior to 3.1.3, the POST /api/v1/oauth2-credential/refresh/:credentialId endpoint is included in WHITELIST_URLS and requires no authentication. The endpoint decrypts the stored credential, sends a refresh request to the configured OAuth provider with the client secret and refresh token, and returns the refreshed access_token in the response body. An attacker with a credential ID can use the token to access the victim's connected service and can also exhaust refresh-token quota. This issue is fixed in 3.1.3.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe 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.\n\n### Root Cause\n\n```typescript\n// packages/server/src/routes/oauth2/index.ts:393-402\nres.json({\n    success: true,\n    message: 'OAuth2 token refreshed successfully',\n    credentialId: credential.id,\n    tokenInfo: {\n        ...tokenData,  // ← includes access_token!\n        has_new_refresh_token: !!tokenData.refresh_token,\n        expires_at: updatedCredentialData.expires_at\n    }\n})\n```\n\nWhitelist entry at `packages/server/src/utils/constants.ts:40`.\n\n### Attack Chain\n\n1. Attacker obtains a credential ID (via Finding 2 / public chatflow leak, or enumeration)\n2. Attacker calls `POST /api/v1/oauth2-credential/refresh/:credentialId` (no auth required)\n3. Server decrypts credential, sends refresh request to OAuth provider with user's `client_secret`\n4. Server returns the new `access_token` in the response to the attacker\n5. Attacker uses the token to access the victim's connected service (Google, Microsoft, etc.)\n\n### Docker Validation\n\n`POST /api/v1/oauth2-credential/refresh/fake-uuid` returns `{\"message\":\"Credential not found\"}` (not 401 Unauthorized), proving the endpoint processes the request without authentication.\n\n### Impact\n\n- OAuth2 access token theft for any connected service\n- Full access to the victim's third-party accounts (Google, Microsoft, GitHub, etc.)\n- Client secret transmitted to OAuth provider during refresh\n- Can also be used for DoS by exhausting refresh token quota\n\n### Suggested Fix\n\nRemove the refresh endpoint from `WHITELIST_URLS` and require authentication:\n\n```typescript\n// Remove from WHITELIST_URLS in constants.ts\n// Add authentication check in the route handler\n```\n\n---\n\n## Credits\n\n- Shinobi Security - https://github.com/shinobisecurity","format":"markdown","source":"ghsa"},{"lang":"es","text":"Flowise es una interfaz de usuario de arrastrar y soltar para construir un flujo de modelo de lenguaje grande personalizado. Antes de la versión 3.1.3, el endpoint POST /API/v1/oauth2-credential/refresh/:credentialId está incluido en WHITELIST_URLS y no requiere autenticación. El endpoint descifra la credencial almacenada, envía una solicitud de actualización al proveedor OAuth configurado con el secreto del cliente y el token de actualización, y devuelve el access_token actualizado en el cuerpo de la respuesta. Un atacante con un ID de credencial puede usar el token para acceder al servicio conectado de la víctima y también puede agotar la cuota de tokens de actualización. Este problema está solucionado en la versión 3.1.3.","source":"nvd"}],"published":"2026-08-04T19:37:22.020Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.2,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":"< 3.1.2","status":"affected"}],"vendor":"FlowiseAI","product":"Flowise","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.3"}],"ecosystem":"npm","package":"flowise","purl":"pkg:npm/flowise","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.3"}],"vendor":"flowiseai","product":"flowise","cpe":"cpe:2.3:a:flowiseai:flowise:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-qgvm-j2hm-6m38","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/FlowiseAI/Flowise","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-08-05T19:05:05.323Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-70478","url":"https://www.cve.org/CVERecord?id=CVE-2026-70478","licence":"CVE Terms of Use","modified":"2026-08-05T19:05:33.447Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qgvm-j2hm-6m38","url":"https://github.com/advisories/GHSA-qgvm-j2hm-6m38","licence":"CC-BY-4.0","modified":"2026-08-04T19:56:08.904Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-70478","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70478","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:31.014Z","epss":{"score":0.00534,"percentile":0.46565,"date":"2026-12-01T12:00:22.000Z"}}