PraisonAI Platform Vulnerable to JWT Forgery via Hardcoded Default Secret
The `praisonai-platform` package, versions 0.1.4 and below, is critically vulnerable to authentication bypass and privilege escalation due to a hardcoded default JWT signing secret (`dev-secret-change-me`) that is inadvertently enabled in default deployments, allowing an unauthenticated attacker to forge JWTs and impersonate any user.
The praisonai-platform Python package, specifically versions 0.1.4 and older, developed by Mervin Praison, contains a critical vulnerability where its JSON Web Token (JWT) signing secret defaults to a publicly known string, dev-secret-change-me. This misconfiguration stems from a flawed environment variable check in praisonai_platform/services/auth_service.py (SHA256: cc29d43c5412da2c73c818859b8d8b146587842999b777336017ab9d9e509258). The intended guard to prevent production deployments with the default secret fails if both PLATFORM_JWT_SECRET and PLATFORM_ENV are left unset, causing the application to silently start with the insecure secret. This enables unauthenticated attackers to forge arbitrary JWTs, effectively bypassing authentication for any user, including administrative accounts, across all routes protected by the get_current_user dependency.
Attack Chain
- Initial Access / Reconnaissance: An unauthenticated attacker identifies a
praisonai-platforminstance, possibly by interacting with its API endpoints or discovering the underlying software version. - Vulnerability Identification: The attacker identifies that the application is running
praisonai-platformversion 0.1.4 or earlier and has not correctly configured itsPLATFORM_JWT_SECRETandPLATFORM_ENVenvironment variables, leading to the use of the defaultdev-secret-change-meJWT secret. - Token Forgery: Using the publicly known JWT secret (
dev-secret-change-me) and the HS256 algorithm, the attacker crafts a JWT with arbitrary claims, includingsub(user ID) andemail, for a target user (e.g., an administrative user likeadmin@example.comor a known user ID). - Authentication Bypass: The attacker sends the forged JWT in an
Authorizationheader to a protected endpoint (e.g.,/api/v1/workspaces,/api/v1/projects). - User Impersonation: The
praisonai-platformserver validates the forged token using the default secret and treats the attacker as the impersonated user (e.g.,admin-user-id-attacker-chose). - Privilege Escalation / Unauthorized Access: If the forged token impersonates an administrator or a member of a specific workspace, the attacker gains full access to that user's resources and permissions within the application, including creating, modifying, or deleting data.
- Impact: The attacker proceeds to exfiltrate data, tamper with application settings, or perform other malicious actions as the impersonated user.
Impact
This critical vulnerability directly leads to complete authentication bypass and privilege escalation within affected praisonai-platform deployments. An attacker can impersonate any user, including administrators, by forging JWTs with arbitrary user IDs and email addresses. All routes protected by the get_current_user dependency, which includes core functionalities such as managing workspaces, projects, issues, agents, and labels, become vulnerable to unauthorized access. The consequence is full compromise of the application's data and functionality, with potential for sensitive data exfiltration, system configuration changes, and disruption of service. There is no specific victim count, but any instance of praisonai-platform running the vulnerable versions without proper environment configuration is at risk.
Recommendation
- Immediate Action: Patch
praisonai-platformto a version that addresses this vulnerability or ensurePLATFORM_JWT_SECRETis set to a strong, random, and unique value (at least 32 bytes) in all environments, including development. SetPLATFORM_ENVto a non-devvalue (e.g.,production) for production deployments to ensure the built-in guard is active. - Detection Engineering: Deploy the provided Sigma rule "Detect PraisonAI Platform Vulnerable File (SHA256)" to identify instances running the vulnerable
auth_service.pyfile. - Supply Chain Security: Implement automated scanning for component vulnerabilities (SCA) to identify the presence of
praisonai-platform <= 0.1.4in your software supply chain. - Log Configuration: Ensure application logs are configured to capture environment variable settings on process startup, if possible, to detect instances where
PLATFORM_JWT_SECRETis unset orPLATFORM_ENVdefaults todev.
Detection coverage 2
Detect PraisonAI Platform Vulnerable File (SHA256)
highDetects the presence of the `praisonai_platform/services/auth_service.py` file with the specific vulnerable SHA256 hash, indicating a potentially misconfigured PraisonAI Platform instance.
Detect Suspicious Administrative Access from Unusual Source IPs via PraisonAI Platform API
highDetects successful access attempts to administrative endpoints on the PraisonAI Platform, specifically from source IP addresses that are unusual or not whitelisted for administrative access, potentially indicating authentication bypass or privilege escalation.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
1
hash_sha256
1
string
1
url
| Type | Value |
|---|---|
| url | https://github.com/MervinPraison/PraisonAI |
| hash_sha256 | cc29d43c5412da2c73c818859b8d8b146587842999b777336017ab9d9e509258 |
| string | dev-secret-change-me |