Detection Method: Kolega.dev Deep Code Scan
| Attribute | Value | |---|---| | Location | packages/server/src/enterprise/middleware/passport/index.ts:55 | | Practical Exploitability | High | | Developer Approver | faizan@kolega.ai |
Express session secret has a weak default value 'flowise' when EXPRESSSESSIONSECRET is not set.
secret: process.env.EXPRESS_SESSION_SECRET || 'flowise'
The default session secret 'flowise' is publicly visible and weak. Session cookies signed with this secret can be forged by attackers.
Session hijacking and forgery - attackers can create arbitrary session cookies to impersonate any user, bypassing all authentication mechanisms.
Require EXPRESSSESSIONSECRET to be set with a strong random value. Throw an error on startup if not configured. Use cryptographically strong random strings (minimum 256 bits).
The Express session secret defaults to the string 'flowise' when EXPRESSSESSIONSECRET is not set (line 55). This secret is used to sign session cookies via express-session middleware. Since 'flowise' is publicly visible in the source code, an attacker can forge valid session cookies to impersonate any user without authentication. The .env.example file has this commented out (# EXPRESSSESSIONSECRET=flowise), implying it's optional, which compounds the risk. Unlike development-only defaults, this code path is active in production if the environment variable is not set. The application should require EXPRESSSESSIONSECRET to be explicitly configured with a cryptographically strong random value and fail to start otherwise.
{
"severity": "MODERATE",
"cwe_ids": [
"CWE-798"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-16T21:22:00Z",
"nvd_published_at": null
}