/

CVE-2026-57148

Severity:

CRITICAL RISK

(9.8)

Hardcoded JWT Secret (CWE-798) in PraisonAI Platform

CVE-2026-57148

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287, CWE-798, CWE-1188

Impact:

Account and Workspace Owner Impersonation

Severity:

CRITICAL RISK

(9.8)

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

PraisonAI Platform versions before 0.1.6 may use a publicly known default signing key when PLATFORM_JWT_SECRET is not configured and development-mode safeguards remain active. An unauthenticated attacker who knows a target identifier could create a signed JWT and impersonate that user or workspace owner.

Affected context

The vulnerability occurs in deployments where the platform runs without an explicitly configured PLATFORM_JWT_SECRET and PLATFORM_ENV retains its development default. In that state, authentication services may accept tokens signed with a predictable fallback key, allowing forged identities to be treated as authenticated.

Exploit preconditions

  • Attack surface: JWT-based authentication endpoints and protected platform APIs
  • Required access: No prior authentication is required; the attacker must know or discover a target identifier
  • Trigger point: Token verification performed by AuthService._verify_token()
  • Why exploitation is possible: A predictable fallback HS256 key remains accepted when the required production secret and environment safeguards are absent

Why this happens

The underlying flaw is the use of a public, development-only signing secret as a fallback for production authentication. This insecure default allows an unauthenticated party to create tokens that pass signature verification, while disabled environment and issuance guards fail to prevent the configuration. The issue primarily maps to CWE-798, Use of Hard-coded Credentials, and also relates to CWE-287, Improper Authentication, and CWE-1188, Insecure Default Initialization of Resource.

Potential impact

  • An attacker may impersonate an existing user
  • An attacker could impersonate a workspace owner
  • Protected API operations may be performed under a forged identity
  • Workspace data or configuration may be accessed or modified
  • Account activity and audit attribution could become unreliable

General mitigation guidance

Mitigation generally focuses on removing predictable authentication defaults

and enforcing secure startup behavior.

Common defensive patterns include:

  • Require a strong, deployment-specific JWT secret rather than falling back to a known value
  • Fail closed when mandatory authentication configuration is absent or invalid
  • Separate development defaults from production authentication behavior
  • Enforce explicit production environment configuration before starting protected services
  • Apply least privilege to user and workspace-owner roles
  • Rotate signing material and invalidate tokens after suspected key exposure
  • Keep secrets in managed secret stores rather than source code or public configuration

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis searches for hardcoded secrets, public fallback keys, and default credential literals
  • Code review checks for authentication code that continues startup when required secrets are missing
  • Configuration-policy enforcement requiring non-default signing secrets in deployment manifests
  • Tests that verify production startup fails when authentication secrets are unset
  • Monitoring for tokens signed with unexpected key identifiers, unusual identity patterns, or sudden owner-level activity
  • Automated security review tools that flag insecure defaults and weak authentication configuration

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/e0fb8e7dd1ee6759c18ed07f436c21dbd9c20747
github.comgithub.com/MervinPraison/PraisonAI/pull/1793
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.51
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-f38v-77qj-h4jq

Frequently asked

questions

Yes. In affected configurations, exploitation can occur through exposed

authentication-protected platform interfaces without a prior authenticated

session.

No. The described condition permits unauthenticated token creation, although

the attacker generally needs a valid target identifier to impersonate a

specific user or workspace owner.

Remove public fallback signing keys, require a strong secret supplied through

protected configuration, and fail closed when that secret is unavailable.

Enforce secure production defaults, validate authentication configuration at

startup, scan for hardcoded credentials, and test that development settings

cannot silently enable production services.

Find out what's already
exploitable in your codebase.