Flowise Enterprise Authentication Bypass via Hardcoded Default JWT Secrets (CVE-2026-56271)
by Reported to FlowiseAI (GHSA-cc4f-hjpj-g9p8); PoC lab generated by AttackWatch · 2026-07-12
- Severity
- Critical
- CVE
- CVE-2026-56271 (GHSA-cc4f-hjpj-g9p8)
- Category
- web
- Affected product
- Flowise — open-source low-code LLM/agent orchestration platform (enterprise edition, passport authentication middleware)
- Affected versions
- Flowise before 3.1.0 (3.0.13 and earlier)
- Disclosed
- 2026-07-12
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-12 |
| Last Updated | 2026-07-12 |
| Author / Researcher | Reported to FlowiseAI (GHSA-cc4f-hjpj-g9p8); PoC lab generated by AttackWatch |
| CVE / Advisory | CVE-2026-56271 (GHSA-cc4f-hjpj-g9p8) |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSS 3.1, AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Status | Weaponized (functional PoC forges valid admin JWTs and confirms bypass against real endpoints) |
| Tags | flowise, ai-gateway, llm-orchestration, jwt, hardcoded-secret, authentication-bypass, cwe-321, unauthenticated, remote, privilege-escalation |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Flowise — open-source low-code LLM/agent orchestration platform (enterprise edition, passport authentication middleware) |
| Versions Affected | Flowise before 3.1.0 (3.0.13 and earlier) |
| Language / Platform | Node.js/TypeScript (packages/server/src/enterprise/middleware/passport/index.ts) |
| Authentication Required | No — the entire bug is bypassing authentication |
| Network Access Required | Yes — any reachable Flowise instance with the enterprise passport middleware active |
Summary
Flowise’s enterprise passport authentication middleware signs and verifies JWTs using values pulled from environment variables (JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_AUDIENCE, JWT_ISSUER). When an operator doesn’t set these — an easy oversight in a quick deployment or trial setup — the application silently falls back to hardcoded, publicly-known default values: secrets 'auth_token'/'refresh_token' and audience/issuer 'AUDIENCE'/'ISSUER'. Because these defaults are baked into the shipped source code, anyone can read them directly from the public repository and forge a validly-signed JWT for any user — including one claiming role: administrator — without ever authenticating. The forged token is accepted by every endpoint gated by the passport middleware.
Vulnerability Details
Root Cause
Tracked as CWE-321 (Use of Hard-coded Cryptographic Key). The middleware’s JWT verification/issuance logic reads its signing secrets and claim values from environment variables but has no fail-closed behavior when they’re absent — it substitutes hardcoded defaults and continues operating normally, giving no visible indication (error, warning, degraded mode) that the deployment is running with attacker-known secrets. Since JWT validity is the entire basis for the passport middleware’s authorization decisions, possession of the default secret is equivalent to possessing valid admin credentials.
Attack Vector
- Confirm the target is running a vulnerable Flowise instance (passive fingerprinting via
/api/v1/ping,/api/v1/version, or response markers). - Locally forge a JWT using the publicly known default secret
'auth_token', audience'AUDIENCE', and issuer'ISSUER', with claims of choice — e.g.role: ADMIN,permissions: ["*"]. - Present the forged token to any protected API route (
/api/v1/chatflows,/api/v1/credentials,/api/v1/apikey,/api/v1/user,/api/v1/organization, etc.) viaAuthorization: Bearer <token>or the equivalent session cookie. - If the instance never set the JWT environment variables, the middleware accepts the forged signature and treats the request as fully authenticated with the claimed role — no password, session, or prior interaction required.
Impact
Full unauthenticated authentication bypass and privilege escalation to administrator on any affected Flowise deployment that didn’t explicitly configure its JWT secrets. Impact includes access to stored credentials/API keys for every connected LLM provider and integration, full chatflow/agent configuration read-write access, and organization/workspace administration — effectively complete compromise of the AI orchestration platform and everything it’s wired into.
Environment / Lab Setup
Target: Flask-based vulnerable-app simulation reproducing Flowise's exact
hardcoded-JWT-secret pattern (vulnerable-app/ in this folder)
Comparison: patched-app/ demonstrates the fix (fail-closed env var enforcement,
minimum secret length/entropy, forbidden-default rejection)
Attacker: Any host with Python 3 + requests + PyJWT
Tools: Docker + docker compose, python3
Setup Steps
| |
Proof of Concept
See
poc.py,docker-compose.yml,vulnerable-app/, andpatched-app/in this folder — mirrored from fankh/attackwatch-vulnerability-poc (Apache 2.0). Verified before ingestion: all files exist and are clean,poc.pyperforms a genuine functional exploit (forges real admin JWTs using the hardcoded secrets and confirms unauthorized access is granted, not just a version/banner check), andvulnerable-app/app.pyis a faithful, self-contained reproduction of Flowise’s exact vulnerable pattern — including inline comments showing the forgery technique.
Step-by-Step Reproduction
- Stand up the lab —
docker compose up -dstarts both the vulnerable simulation (port 8080) and the patched version (port 8081) for direct comparison. - Fingerprint the target — the script passively probes common Flowise routes/markers to confirm the product before testing.
- Establish an unauthenticated baseline — request each protected endpoint with no credentials; expect 401/403.
- Forge a JWT with the hardcoded secret — sign a token claiming
role: ADMINusing secret'auth_token', audience'AUDIENCE', issuer'ISSUER'. - Present the forged token — across multiple header/cookie variants (
Authorization: Bearer,token/access_token/jwtcookies) against each protected endpoint; a status change from 401/403 to 200 with valid JSON confirms the bypass.
Exploit Code
| |
Minimal standalone equivalent (from vulnerable-app/app.py’s own inline comment):
| |
Expected Output
[VULNERABLE]
Confidence: 95%
Evidence: Forged JWT (secret='auth_token', aud='AUDIENCE', iss='ISSUER') via bearer
accepted at /api/v1/chatflows: unauth HTTP 401 -> auth HTTP 200
Method: bypass_based:auth:bearer
Stage: active_test
Detection & Indicators of Compromise
SIEM / IDS Rule (example):
alert http any any -> any any (msg:"Possible CVE-2026-56271 Flowise forged-JWT auth bypass attempt"; content:"Authorization|3a| Bearer"; http_header; content:"AUDIENCE"; content:"ISSUER"; sid:9000401; rev:1;)
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade to Flowise >= 3.1.0. |
| Config Hardening | Always explicitly set JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_AUDIENCE, and JWT_ISSUER to high-entropy, unique values — never rely on defaults. Rotate immediately if any deployment may have run without these set. |
| Incident response if already compromised | Rotate all JWT secrets, invalidate all existing sessions/tokens, audit for unauthorized admin accounts or configuration changes made during the exposure window. |
References
- GHSA-cc4f-hjpj-g9p8 — GitHub Security Advisory
- VulnCheck advisory
- Public PoC lab — fankh/attackwatch-vulnerability-poc
Notes
Surfaced via a 2-day CVE discovery pass on 2026-07-12. Initial WebSearch found no PoC; a follow-up gh search code pass located fankh/attackwatch-vulnerability-poc, a systematic PoC-generation repository (Apache 2.0, actively maintained, 61+ CVEs covered for 2026, apparently produced by an automated service called “AttackWatch”) which had a real, functional entry for this CVE. Verified before ingestion per this archive’s standing rule: read poc.py and both vulnerable-app/patched-app simulation apps in full — all clean, no obfuscation, and the vulnerable-app is a faithful line-for-line reproduction of the documented flaw (down to the exact hardcoded secret strings named in the CVE description).
| |