Summary
Flowise uses a hardcoded, publicly known default secret for its express-session middleware when the EXPRESS_SESSION_SECRET environment variable is not set.
Under these conditions, an attacker can forge valid signed session cookies, impersonate users, and effectively bypass authentication controls.
Affected context
This vulnerability arises in Flowise server deployments that rely on the default configuration and do not explicitly set a strong, unique EXPRESS_SESSION_SECRET.
It primarily affects environments where the application is exposed over HTTP(S) and uses express-session for authentication and user state management.
In such setups, the hardcoded secret becomes the single point of trust for all session cookies, making any instance with this default value susceptible if an attacker can reach the application and craft cookies.
Exploit preconditions
- Attack surface: Public or internal web interface using Flowise with express-session.
- Required access: Network access to the Flowise server; no valid account is strictly required if session cookies can be forged.
- Trigger point: The server verifies incoming session cookies using the default secret instead of a properly configured environment secret.
- Why exploitation is possible: The session signing key is a hardcoded, publicly known value ("flowise"), enabling attackers to generate cookies that the server will accept as authentic.
Why this happens
The core issue is the use of a weak, hardcoded default secret for session signing rather than requiring a secure, deployment-specific configuration value.
This pattern maps directly to CWE-798: Use of Hard-coded Credentials, where secrets or keys embedded in source code become universal keys for all deployments using the default.
By treating a static string as a cryptographic secret, the authentication mechanism effectively trusts any session cookie signed with that known value, undermining the integrity of user sessions and access control.
Potential impact
- Attackers could impersonate any user, including administrative accounts.
- Authentication checks may be bypassed entirely via forged session cookies.
- Sensitive data accessible through authenticated endpoints could be exposed.
- Application configuration and workflows may be altered by unauthorized actors.
- Compromised sessions can be used as a foothold for broader system or network attacks.
General mitigation guidance
Mitigation focuses on eliminating hardcoded secrets and enforcing robust secret management practices.
Common defensive patterns include:
- Requiring unique, high-entropy session secrets per deployment with no built-in default.
- Integrating with a centralized secrets management system instead of embedding secrets in code.
- Validating configuration at startup to ensure session secrets are set and meet minimum strength requirements.
- Rotating session secrets periodically and invalidating old sessions when changes occur.
- Applying least-privilege to authenticated roles so that any single compromised session has limited impact.
These practices reduce reliance on static, predictable values and make session forgery significantly harder.
How teams detect issues like this
Effective detection strategies include:
- Static analysis rules that flag hardcoded secrets, keys, or tokens in source code.
- Configuration audits that verify the presence and strength of EXPRESS_SESSION_SECRET or equivalent parameters.
- Code review checklists that disallow default secrets for authentication or signing mechanisms.
- Runtime monitoring for anomalous login patterns, suspicious session cookie structures, or high-privilege access from unexpected identities.
- Automated policy enforcement in CI/CD pipelines to block deployments that lack required secret configuration.

