NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Flowise

GHSA-cc4f-hjpj-g9p8: Flowise: Weak Default JWT Secrets

mediumCVSS 3.1 5.6

Flowise 3.0.13 and earlier fall back to hardcoded JWT secrets (`auth_token`, `refresh_token`) and claims (`AUDIENCE`, `ISSUER`) when the matching environment variables are unset. Anyone who reads the source can forge valid JWTs and impersonate any user, including admins. Upgrade `flowise` to 3.1.0 and set strong secrets.

Published Apr 16, 2026 · Analysis Oct 30, 2026

What an attacker can do

packages/server/src/enterprise/middleware/passport/index.ts (lines 29-34) reads JWT_AUDIENCE, JWT_ISSUER, JWT_AUTH_TOKEN_SECRET and JWT_REFRESH_TOKEN_SECRET, and falls back to AUDIENCE, ISSUER, auth_token and refresh_token. The refresh secret also falls back to the auth token secret, so setting only JWT_AUTH_TOKEN_SECRET makes both tokens share one secret.

An admin who deploys without setting these variables runs with values that are public in the source. An attacker can sign a JWT with auth_token and the default audience and issuer. The server accepts it as valid, so the attacker can act as any user, including an administrator. The advisory describes this as a complete authentication bypass, and the scanner rated it critical with high practical exploitability.

The repository's CVSS vector is local, high privileges, user interaction, giving 5.6, which does not match the text. The .env.example placeholders are also weak and public. Treat any install with unset JWT variables as open.

Who is affected

npm package flowise, 3.0.13 and earlier, where any of JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_AUDIENCE or JWT_ISSUER is unset. Check:

npm ls flowise

Then confirm each variable is set in your environment or .env file, and that it is not an example value.

flowise

Ecosystem
npm
Affected
<= 3.0.13
Fixed in
3.1.0
Check
npm ls flowise

How to fix it

Upgrade flowise to 3.1.0:

npm install [email protected]

The advisory recommends removing all default secrets, failing at startup if any is missing, and using 256 bits or more of random data for each secret separately. Set all four variables now with distinct random values. Changing the secrets invalidates existing tokens, so users sign in again.

How to tell if you were hit

Check that the four JWT variables are set on the Flowise process. If any was unset, review admin and user activity for sessions that have no matching login event, and for new admin accounts or changed credentials. The sources list no log signatures for forged tokens.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Detection Method: Kolega.dev Deep Code Scan

| Attribute | Value |
| Severity | Critical |
| Location | packages/server/src/enterprise/middleware/passport/index.ts:29-34 |
| Practical Exploitability | High |
| Developer Approver | [email protected] |

Description

JWT secrets have weak hardcoded defaults ('auth_token', 'refresh_token', 'AUDIENCE', 'ISSUER'). Attackers can forge valid JWTs and impersonate any user.

Affected Code

const jwtAudience = process.env.JWT_AUDIENCE || 'AUDIENCE'
const jwtIssuer = process.env.JWT_ISSUER || 'ISSUER'
const jwtAuthTokenSecret = process.env.JWT_AUTH_TOKEN_SECRET || 'auth_token'
const jwtRefreshSecret = process.env.JWT_REFRESH_TOKEN_SECRET || process.env.JWT_AUTH_TOKEN_SECRET || 'refresh_token'

Evidence

All JWT defaults are weak strings. Refresh token falls back to auth token which is a design flaw. If any environment variable is unset, weak default is used.

Impact

Complete authentication bypass. Attackers can forge valid JWTs for any user account. No authentication required to access protected endpoints. Can escalate to admin access.

Recommendation

Remove all default secrets - require all JWT environment variables to be explicitly set. Add startup validation throwing error if any JWT secret is missing. Use cryptographically random secrets (256+ bits) for each secret independently. Implement JWT secret rotation mechanism.

Notes

The JWT secrets have genuinely weak hardcoded defaults ('auth_token', 'refresh_token', 'AUDIENCE', 'ISSUER') at lines 29-34. If an administrator deploys without setting the environment variables JWT_AUTH_TOKEN_SECRET, JWT_REFRESH_TOKEN_SECRET, JWT_AUDIENCE, and JWT_ISSUER, the application will use these trivially guessable values. An attacker knowing these defaults (which are publicly visible in the source code) can forge valid JWTs to impersonate any user, including administrators. The fallback chain at line 34 where jwtRefreshSecret falls back to jwtAuthTokenSecret is an additional design weakness - if only JWT_AUTH_TOKEN_SECRET is set, both tokens share the same secret. While .env.example files provide placeholder values, these are also weak and publicly visible. The application should fail to start if these secrets are not explicitly configured with strong values, rather than silently falling back to insecure defaults.

Credited to kolega-ai-dev.

Questions

What are the default values?

auth_token for the auth secret, refresh_token for the refresh secret, AUDIENCE for the audience and ISSUER for the issuer.

Is it enough to set only JWT_AUTH_TOKEN_SECRET?

No. The refresh secret then falls back to the same value, so both tokens share one secret. Set each one separately.

Which version fixes GHSA-cc4f-hjpj-g9p8?

Flowise 3.1.0. Versions up to 3.0.13 are listed as vulnerable.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Flowise vulnerabilities

All Flowise entries