🛡️ CVE-2026-47410 — praisonai-platform

🔴 CVSS 9.8 — Critical ✅ No Known Exploit CWE-321 NVD
9.8
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

praisonai-platform: JWT signing key defaults to hardcoded "dev-secret-change-me", allowing token forgery for any user when PLATFORM_ENV is unset

Summary

Type: Insecure default cryptographic key. The JWT signing secret defaults to the hardcoded literal "dev-secret-change-me" when PLATFORM_JWT_SECRET is unset. A safety check exists but only fires when PLATFORM_ENV != "dev"; the default value of PLATFORM_ENV is "dev", so the check is silently bypassed in any deployment that does not explicitly opt out. The attacker reads the literal from this public source file, mints a JWT with arbitrary sub and email claims, and authenticates as any existing user (including workspace owners and admins).

File: src/praisonai-platform/praisonai_platform/services/auth_service.py, lines 25-36 and 114-137.

Root cause: the production-mode guard checks os.environ.get("PLATFORM_ENV", "dev") != "dev" — but the default is "dev", so a clean deployment that just imports the package and runs uvicorn praisonai_platform.api.app:app proceeds with the hardcoded secret. The package documentation does not warn loudly enough that BOTH variables must be set; the guard suppresses itself when either condition is missed. JWT verification at line 129 trusts whatever the token says (sub, email, name) once the HMAC-SHA256 signature validates against the publicly-known secret. Since the verifier accepts forged tokens for any user_id, the attacker becomes that user across every authenticated route.

Affected Code

File: src/praisonai-platform/praisonai_platform/services/auth_service.py, lines 25-36 and 114-137.

```python

_DEFAULT_SECRET = "dev-secret-change-me"

JWT_SECRET = os.environ.get("PLATFORM_JWT_SECRET", _DEFAULT_SECRET) # <-- BUG: silent fallback

JWT_ALGORITHM = "HS256"

JWT_TTL_SECONDS = int(os.environ.get("PLATFORM_JWT_TTL", str(30 * 24 * 3600)))

if JWT_SECRET == _DEFAULT_SECRET and os.environ.get("PLATFORM_ENV", "dev") != "dev":

raise RuntimeError( # <-- only fires if PLATFORM_ENV is non-default

"PLATFORM_JWT_SECRET must be set to a strong random value in production. "

"Set PLATFORM_ENV=dev to suppress this check during development."

)

# ...

def _issue_token(self, user: User) -> str:

payload = {

"sub": user.id,

"email": user.email,

"name": user.name,

"iat": now,

"exp": now + timedelta(seconds=JWT_TTL_SECONDS),

}

return jwt.encode(payload, JWT_SECRET, algorithm=JWT_ALGORITHM) # signs with the hardcoded secret

def _verify_token(self, token: str) -> Optional[AuthIdentity]:

try:

payload = jwt.decode(token, JWT_SECRET, algorithms=[JWT_ALGORITHM]) # verifies with the hardcoded secret

return AuthIdentity(

id=payload["sub"], # <-- attacker chooses sub

type="user",

email=payload.get("email"),

name=payload.get("name"),

)

except jwt.InvalidTokenError:

return None

```

Why it's wrong: the guard's predicate is wrong. The intent — "warn loudly if a production deployment ships without setting the secret" — is correct, but the implementation requires the operator to set BOTH variables (PLATFORM_JWT_SECRET and PLATFORM_ENV != "dev") for the guard to fire. A common deployment misconfiguration is to set only one (or neither): pip install praisonai-platform, uvicorn praisonai_platform.api.app:app --host 0.0.0.0, done. The package starts with no warning, the JWT signing key is the literal string sitting in this source file, and any attacker who reads the GitHub repo can forge tokens. The standard pattern is to fail-closed at import time when the secret is the default, regardless of any environment variable. The code at line 32-36 inverts that: it fails-open by default and only fails-closed when the operator opts in.

Exploit Chain

1. Attacker reads auth_service.py:25 from the public GitHub repo (MervinPraison/PraisonAI) and notes _DEFAULT_SECRET = "dev-secret-change-me". State: attacker holds the JWT signing key.

2. Attacker identifies a target deployment of praisonai-platform (Shodan search for the FastAPI route /auth/me, the praisonai_platform user-agent, or any indexed installation). Attacker registers a free account at POST /auth/register to confirm the deployment is live and to obtain at least one valid JWT token whose structure they can copy. State: attacker holds a live account.

3. Attacker enumerates the platform's user IDs via any of the IDOR primitives filed as separate advisories (issue created_by, agent owner_id, comment author_id, member list via the workspace-member-IDOR), or simply queries /auth/me with their own token to learn the UUID format. State: attacker has a target user UUID T_id (e.g. a workspace owner of any tenant).

4. Attacker forges a JWT:

```p

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.

Affected software

CVE-2026-47410 is recorded against 2 packages.

  • praisonai-platform (fixed in 0.1.4)
  • unknown

Timeline and source

Published on 29 May 2026 and last revised on 13 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Package)

Details

Severity CRITICAL
CVSS Score 9.8
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE CWE-321
Public Exploit ✅ No
Source NVD
Published 2026-05-29
Updated 2026-08-12
Modified 2026-07-13
Fix URL N/A

Affected Packages

Software From version Fixed in
praisonai-platform 0.1.4
unknown

Similar Threats

Exploit Protection

Are you running praisonai-platform?

CVE-2026-47410 carries CVSS 9.8 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-47410 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.