/

CVE-2026-47410

Severity:

CRITICAL RISK

(9.8)

Hardcoded JWT Secret (CWE-321) in PraisonAI

CVE-2026-47410

Deferred

Vulnerability type

Category:

Hardcoded Cryptographic Key

CWE:

CWE-321, CWE-798

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 versions prior to 0.1.4 ship with a hardcoded JWT signing secret that is used whenever the environment variable PLATFORM_JWT_SECRET is not set. Because the default environment is treated as development and bypasses the safety check, many real deployments may unknowingly rely on this insecure default.

An attacker who knows the hardcoded secret can forge valid JWTs with arbitrary user identifiers and email claims, allowing them to authenticate as any existing user, including privileged workspace owners and admins.

Affected context

This vulnerability appears in PraisonAI Platform deployments that:

  • Do not explicitly set a unique PLATFORM_JWT_SECRET value in their environment
  • Run with the default PLATFORM_ENV value of "dev" in non-development environments
  • Rely on JWTs for session or API authentication without additional verification layers

In such contexts, the application continues to use the built-in literal "dev-secret-change-me" as the JWT signing key, creating a predictable, shared secret across installations.

Exploit preconditions

  • Attack surface: Any endpoint that accepts JWTs for authentication or authorization (web UI, APIs, or internal services).
  • Required access: No prior authentication is required; the attacker only needs network access to the PraisonAI Platform and knowledge of the default signing key from public source code.
  • Trigger point: Submission of a forged JWT token in an Authorization header, cookie, or other token-bearing mechanism accepted by the platform.
  • Why exploitation is possible: The JWT validation logic trusts tokens signed with a single static key; since that key is hardcoded and shared, an attacker can generate tokens that verify as legitimate and impersonate arbitrary users.

Why this happens

The core issue maps to CWE-321: Use of Hard-coded Cryptographic Key and is reinforced by CWE-798: Use of Hard-coded Credentials.

Instead of requiring a unique, deployment-specific secret for JWT signing, the platform defines a global default literal ("dev-secret-change-me") in code.

The safety check intended to prevent this in production is gated on an environment variable (PLATFORM_ENV) whose default value suppresses the check, allowing real-world deployments to unintentionally run with the development secret.

This pattern treats a static, publicly known value as a long-term cryptographic key, eliminating the unpredictability that underpins token-based authentication.

Potential impact

  • Attackers can impersonate any existing user by minting JWTs with arbitrary sub and email claims.
  • Administrative or workspace owner accounts can be taken over, leading to full control of projects, agents, and configurations.
  • Sensitive data stored or processed by PraisonAI Platform can be accessed, modified, or deleted.
  • Audit logs and activity traces may be polluted with attacker-generated actions, hindering incident response.
  • Multi-tenant or shared deployments can experience cross-tenant data exposure if token scopes are not strictly enforced.

General mitigation guidance

Effective mitigation focuses on eliminating hardcoded secrets and enforcing strong, environment-specific keys:

  • Require a unique, high-entropy JWT signing key per deployment, sourced from environment variables or secure secret stores rather than code.
  • Fail closed when critical secrets like PLATFORM_JWT_SECRET are missing, preventing startup instead of silently falling back to defaults.
  • Separate development and production configurations, ensuring development-only defaults cannot be applied inadvertently in production.
  • Regularly rotate JWT signing keys and implement mechanisms to invalidate or expire tokens signed with previous keys when feasible.
  • Limit token lifetime and scope so that any compromised token or key has reduced impact.

How teams detect issues like this

Organizations can detect this class of issue and its manifestations through multiple approaches:

  • Static analysis and code review: Flag any occurrence of literals used as cryptographic keys, JWT secrets, or credential-like values (e.g., "dev-secret-change-me"), and require justification or removal.
  • Configuration and deployment checks: Add health checks or policy-as-code rules that verify PLATFORM_JWT_SECRET is set to a non-default value in every environment before deployment.
  • Runtime monitoring: Inspect JWTs in logs and telemetry for patterns such as overly long lifetimes, unexpected issuers, or tokens that validate across multiple environments using the same key.
  • Security testing: Include tests in CI/CD that attempt to sign JWTs with known default or weak secrets and confirm they are rejected by the platform.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/ef79b7a0561796ad9807f0f09538c25cc78d3619
github.comgithub.com/MervinPraison/PraisonAI/pull/1685
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-3qg8-5g3r-79v5

Frequently asked

questions

Exploitation is broad wherever deployments rely on the default JWT secret; anyone who can reach the PraisonAI Platform over the network and knows or can discover the default key can forge valid tokens, so the vulnerability should be treated as remotely exploitable.

No. The attacker can generate tokens from scratch using the hardcoded key and arbitrarily choose sub and email claims, allowing them to impersonate existing accounts without prior access.

The safest pattern is to remove hardcoded secrets entirely, require a unique, high-entropy JWT signing key per deployment, and fail initialization if that secret is not explicitly provided via a secure channel such as environment variables or a secret manager.

Treat all cryptographic material and credentials as configuration, never as code; enforce secret provisioning in deployment pipelines, use secret management systems, and add automated checks that prevent default or placeholder secrets from being used in production-like environments.

Find out what's already
exploitable in your codebase.