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_SECRETvalue in their environment - Run with the default
PLATFORM_ENVvalue 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
Authorizationheader, 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
subandemailclaims. - 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_SECRETare 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_SECRETis 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.

