/

CVE-2026-56278

Severity:

CRITICAL RISK

(9.1)

Hardcoded Session Secret (CWE-798) in Flowise Auth

CVE-2026-56278

Analyzed

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Authentication Bypass and Account Impersonation

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-2qqc-p94c-hxwh
vulncheck.comvulncheck.com/advisories/flowise-session-hijacking-via-weak-default-express-session-secret

Frequently asked

questions

Yes. If the Flowise server is reachable over the network and uses the default hardcoded secret, an attacker can remotely forge session cookies to gain access.

Only network access to the application is required. Knowledge of the hardcoded secret is sufficient to craft valid cookies without any pre-existing account.

Remove hardcoded secrets from the codebase and require a strong, deployment-specific session secret configured via secure mechanisms such as environment variables or secret stores.

Establish secure configuration baselines that forbid default authentication secrets, implement automated checks for hardcoded credentials, and enforce robust secret management practices throughout the development and deployment lifecycle.

Find out what's already
exploitable in your codebase.