CVE-2026-56269
JSON

4.3medium

Flowise - Weak Default Token Hash Secret in JWT Token Encryption

Severity
4.3medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.10% (higher than 0% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-m7mq-85xj-9x33

Description

Flowise before 3.1.0 (npm package flowise, versions 3.0.13 and earlier) uses a weak hardcoded default value 'Secre$t' for the TOKEN_HASH_SECRET environment variable in packages/server/src/enterprise/utils/tempTokenUtils.ts when the variable is not configured. This secret derives the AES-256-CBC key used to encrypt user IDs and workspace IDs in the 'meta' field of JWT tokens. An attacker who knows the default secret can decrypt this metadata to extract internal user and workspace identifiers, and re-encrypt manipulated values such as altered user or workspace IDs. Because the JWT signature is validated separately, decrypting or tampering with this metadata does not by itself grant access, but the disclosure of internal identifiers and possible metadata manipulation could aid privilege escalation or unauthorized data access.

Affected

Product or packageVersionsReported by
Flowise Flowisebefore 3.1.0
Not affected: 3.1.0
CVE List
flowise (npm)before 3.1.0GitHub Advisory Database
flowiseai flowisebefore 3.1.0NVD

All scores

VulnCheck4.3medium CVSS:4.0CVSS:4.0/AV:L/AC:H/AT:N/PR:H/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
VulnCheck4.6medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:L/A:N
GitHub5.6medium CVSS:3.0CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:H/AT:N/PR:H/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Classification

CWE-798

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Flowise before 3.1.0 (npm package flowise, versions 3.0.13 and earlier) uses a weak hardcoded default value 'Secre$t' for the TOKEN_HASH_SECRET environment variable in packages/server/src/enterprise/utils/tempTokenUtils.ts when the variable is not configured. This secret derives the AES-256-CBC key used to encrypt user IDs and workspace IDs in the 'meta' field of JWT tokens. An attacker who knows the default secret can decrypt this metadata to extract internal user and workspace identifiers, and re-encrypt manipulated values such as altered user or workspace IDs. Because the JWT signature is validated separately, decrypting or tampering with this metadata does not by itself grant access, but the disclosure of internal identifiers and possible metadata manipulation could aid privilege escalation or unauthorized data access.

GitHub Advisory Database

Detection Method: Kolega.dev Deep Code Scan

AttributeValue
Locationpackages/server/src/enterprise/utils/tempTokenUtils.ts:31-34
Practical ExploitabilityMedium
Developer Approverfaizan@kolega.ai
Description

The encryption key for token encryption has a weak default value 'Secre$t' when TOKEN_HASH_SECRET environment variable is not set.

Affected Code
const key = crypto
    .createHash('sha256')
    .update(process.env.TOKEN_HASH_SECRET || 'Secre$t')
    .digest()
Evidence

The default value 'Secre$t' is hardcoded in the source code and is cryptographically weak. This key is used to encrypt user IDs and workspace IDs in JWT tokens.

Impact

Token forgery - attackers can decrypt and manipulate encrypted token metadata, potentially changing user IDs or workspace IDs to escalate privileges or access unauthorized data.

Recommendation

Require TOKEN_HASH_SECRET to be set as a strong random value in environment variables. Throw an error on startup if not configured. Use a minimum of 32 bytes of entropy.

Notes

The TOKEN_HASH_SECRET has a weak hardcoded default 'Secre$t' (lines 31-34 and 50-53). This secret is used to derive an AES-256-CBC encryption key for encrypting sensitive metadata (user ID and workspace ID) embedded in JWT tokens via encryptToken() called at line 394 of passport/index.ts. If TOKEN_HASH_SECRET is not configured, an attacker knowing the default can decrypt the 'meta' field in JWTs to extract user IDs and workspace IDs. While this alone doesn't grant access (the JWT signature is separate), it leaks internal identifiers that could aid other attacks. The .env.example shows '# TOKEN_HASH_SECRET='popcorn'' - another weak value, and it's commented out suggesting it's optional. The application should require this secret to be explicitly set with a strong random value.

NVD (es)

Flowise anterior a 3.1.0 (paquete npm flowise, versiones 3.0.13 y anteriores) utiliza un valor predeterminado débil codificado de forma rígida ’Secre$t’ para la variable de entorno TOKEN_HASH_SECRET en packages/server/src/enterprise/utils/tempTokenUtils.ts cuando la variable no está configurada. Este secreto deriva la clave AES-256-CBC utilizada para cifrar ID de usuario e ID de espacio de trabajo en el campo ’meta’ de los tokens JWT. Un atacante que conoce el secreto predeterminado puede descifrar estos metadatos para extraer identificadores internos de usuario y de espacio de trabajo, y volver a cifrar valores manipulados como ID de usuario o de espacio de trabajo alterados. Debido a que la firma JWT se valida por separado, descifrar o manipular estos metadatos no otorga acceso por sí mismo, pero la divulgación de identificadores internos y la posible manipulación de metadatos podría facilitar la escalada de privilegios o el acceso no autorizado a datos.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-56269 changed 2026-06-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-m7mq-85xj-9x33 changed 2026-07-20CC-BY-4.0
NVDCVE-2026-56269 changed 2026-10-25Public domain