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_SECRETis unset, andPLATFORM_ENVis 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.

