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

