/

CVE-2026-57147

Severity:

CRITICAL RISK

(9.8)

Hard-Coded JWT Secret (CWE-798) in PraisonAI Platform

CVE-2026-57147

Deferred

Vulnerability type

Category:

Hard-Coded Credentials

CWE:

CWE-798, CWE-1188

Impact:

Authentication Bypass and Account 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 uses a publicly known development secret to sign JWTs when the expected secret is not configured, while its production safety check may also remain inactive when the environment setting is absent. A remote unauthenticated attacker may forge tokens and impersonate arbitrary users when protected API routes trust the resulting identity.

Affected context

The vulnerability occurs in deployments where the platform JWT secret is unset and the environment configuration defaults to development. In that state, authentication components may use a predictable public signing secret and accept forged identities for protected API requests. The practical exposure depends on which routes are enabled and what permissions authenticated users receive.

Exploit preconditions

  • Attack surface: JWT-protected platform API routes exposed over the network
  • Required access: No prior authentication may be required
  • Trigger point: JWT verification performed by AuthService._verify_token() and the current-user dependency
  • Configuration condition: PLATFORM_JWT_SECRET is unset, and PLATFORM_ENV is unset or otherwise resolves to a development setting
  • Why exploitation is possible: The application uses a publicly known fallback signing secret and accepts the token claims as the authenticated identity

Why this happens

The underlying bug is the use of a publicly known development credential as a production-capable JWT signing fallback. In addition, the safety control is conditioned on an environment value that defaults to development, so missing configuration does not fail closed. This maps primarily to CWE-798, Use of Hard-coded Credentials, and is also related to CWE-1188, Insecure Default Initialization of a Resource.

Potential impact

  • An attacker may bypass authentication on affected API routes.
  • An attacker could impersonate arbitrary users represented by accepted token claims.
  • An attacker may access, modify, or delete data permitted to the forged identity.
  • An attacker could perform administrative actions if elevated identities are trusted.
  • The platform may experience unauthorized workflow execution, data exposure, or integrity loss.

General mitigation guidance

Mitigation generally focuses on removing shared, predictable credential

fallbacks and making security-sensitive configuration fail closed.

Common defensive patterns include:

  • Requiring a strong, deployment-specific JWT secret or managed signing key before authentication starts.
  • Rejecting startup when required authentication secrets or environment declarations are missing.
  • Separating development defaults from production configuration through explicit, non-ambiguous modes.
  • Prefering asymmetric signing with protected key management where appropriate.
  • Validating token claims such as issuer, audience, subject format, expiration, and authorization scope.
  • Applying least privilege to service accounts and authenticated identities.
  • Rotating any credential that may have been exposed and invalidating tokens issued with the affected key.

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis rules that flag hard-coded secrets, known placeholder credentials, and JWT signing fallbacks.
  • Code review checks for authentication configuration that defaults to development behavior when values are absent.
  • Tests that start the service with missing security settings and verify that startup fails rather than enabling authentication.
  • Runtime configuration policies requiring non-default secrets and explicit production environment declarations.
  • Monitoring for unusual JWT subjects, token issuers, privilege changes, and authenticated activity inconsistent with normal users.
  • Secret-scanning and automated code-review tools that identify embedded credentials and insecure defaults.

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-cwj8-7gp2-ggcw
youtube.comyoutube.com/watch?v=bDSRHAI28BY&list=RDhqGkrTbgU2c&index=8

Frequently asked

questions

Yes, when the affected platform exposes protected API routes and retains the

predictable fallback signing secret. No prior authentication may be needed.

The attacker generally needs network access to the relevant API endpoints, but

does not need valid credentials if forged tokens are accepted.

Remove public fallback secrets, require deployment-specific signing material,

and fail closed when required authentication configuration is missing. Existing

tokens associated with an exposed key should also be treated as untrusted.

Use explicit production configuration, secret-management controls, automated

secret scanning, configuration tests for missing values, strict token-claim

validation, and least-privilege authorization policies.

Find out what's already
exploitable in your codebase.