/

CVE-2026-45336

Severity:

CRITICAL RISK

(10.0)

Hard-Coded Secret Key (CWE-798) in HireFlow Auth

CVE-2026-45336

Deferred

Vulnerability type

Category:

Hard-Coded Credentials

CWE:

CWE-798

Impact:

Authentication Bypass and Account Compromise

Severity:

CRITICAL RISK

(10.0)

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

HireFlow versions up to 1.2 use a hard-coded Flask secret_key to sign session cookies, enabling anyone who knows the public source value to forge valid sessions.

An unauthenticated attacker can craft cookies with arbitrary role=admin and user_id values, effectively bypassing authentication and gaining administrative access.

Affected context

The vulnerability exists in HireFlow's web-based interview management application when the Flask secret_key is hard-coded directly in app.py.

It is relevant to deployments where:

  • The application uses Flask's signed session cookies for authentication and authorization
  • The source code (and thus the secret key value) is publicly accessible or can be inferred
  • No additional integrity or secondary authentication controls protect privileged actions

In such environments, the trust boundary around session cookies is effectively broken, as the signing secret is no longer secret.

Exploit preconditions

  • Attack surface: Public-facing HireFlow web interface
  • Required access: None; exploitation is possible without prior authentication if the attacker can obtain or guess the hard-coded secret key
  • Trigger point: Submission of a crafted session cookie to the application (e.g., via browser or script)
  • Why exploitation is possible: The application relies on a static, hard-coded Flask secret_key for signing cookies, so any party who knows this value can generate valid session cookies with arbitrary attributes such as role=admin and user_id.

Why this happens

This issue stems from embedding a fixed, hard-coded secret value into application code and using it as the Flask secret_key for session signing.

According to CWE-798: Use of Hard-coded Credentials, secrets such as keys, tokens, or passwords must not be stored directly in source code, as they become effectively public once the code is distributed, shared, or leaked.

In this case, the application's trust model assumes that only the server can produce correctly signed cookies, but that assumption breaks down when the signing key is static and knowable by attackers.

The bug class is not about cryptographic weakness; rather, it is a key management flaw where the confidentiality of the signing secret cannot be guaranteed.

Potential impact

  • Attackers may forge session cookies indicating role=admin, gaining full administrative privileges.
  • Authentication checks can be bypassed entirely by crafting cookies with arbitrary user_id values.
  • Sensitive hiring data, including candidate information and interview schedules, can be viewed, modified, or deleted.
  • Malicious configuration changes could be made to workflows, notifications, or integrations tied to hiring processes.
  • Audit trails and activity logs can be falsified by impersonating other users.
  • The system may be used as a foothold for broader intrusion into connected infrastructure or services.

General mitigation guidance

Mitigation typically focuses on eliminating hard-coded secrets and hardening session management:

  • Move secret values such as Flask secret_key out of the source code and into environment-specific configuration or dedicated secret management systems.
  • Use unique, high-entropy keys per deployment, and rotate them when exposure is suspected or after key management changes.
  • Isolate sensitive operations behind additional authorization checks so that a single session token does not grant unconstrained administrative control.
  • Consider defense-in-depth controls such as IP allowlisting, multi-factor authentication for high-privilege actions, and stricter session lifetime and revocation policies.
  • Implement secure-by-default deployment templates where secrets are injected at runtime rather than embedded during development.

How teams detect issues like this

Detection efforts can focus on both code and runtime behavior:

  • Static analysis and code scanning:
  • Search for hard-coded secret_key assignments in Flask or similar frameworks.
  • Flag literal strings used in security-sensitive configuration fields like signing keys, API tokens, or database passwords.
  • Enforce policies that prohibit secrets in source repositories via pre-commit hooks or CI checks.
  • Code review signals:
  • Review authentication and session management logic for assumptions about the secrecy of keys.
  • Look for single, shared constants used across environments instead of per-environment secrets.
  • Runtime and operational monitoring:
  • Monitor for anomalous patterns such as sudden increases in admin-level actions or logins from unexpected locations.
  • Use web application firewalls or reverse proxies to flag or rate-limit suspicious session behavior.
  • Automated tooling (SAST/secret scanners) can be configured to scan repositories and deployment artifacts for strings that match key or token patterns, helping to catch similar patterns early in the development lifecycle.

Sources

SourceLink
github.comgithub.com/StratonWebDesigners/HireFlow/releases/tag/v1.3
github.comgithub.com/StratonWebDesigners/HireFlow/security/advisories/GHSA-x53g-jr84-jrv5

Frequently asked

questions

Yes. If an attacker can obtain or deduce the hard-coded Flask secret_key from public or leaked source, they can exploit the issue remotely through the normal web interface without needing a valid account.

No prior authentication is required. The only prerequisite is knowledge of the hard-coded secret key value; with that, an attacker can construct valid session cookies that the application will trust as authenticated and potentially administrative.

Remove all hard-coded secrets from source code and load them from secure, environment-specific configuration, such as environment variables or secret management services, using unique, high-entropy values per deployment and rotating them regularly.

Establish secure key management practices from the outset: prohibit secrets in version control, integrate secret scanning into CI, define coding guidelines for handling credentials, and design authentication/session mechanisms under the assumption that source code may become public.

Find out what's already
exploitable in your codebase.