Sanaan Fayaz Wani

Significant-Gravitas/AutoGPT

GHSA-24q6-6h89-f9p7

Hardcoded Default JWT Secret Enables Complete Authentication Bypass

GHSA-24q6-6h89-f9p7

10.0

Critical

CVSS 3.1 base

  1. 2026-10-05Published by the maintainer

What to do

If you run autogpt-platform-backend 0.6.26 to 0.7.4, upgrade to 0.8.0 or later.

Anyone who can reach it over the network, with no account and no user interaction, can read and change sensitive data and make it unavailable, and the impact reaches beyond the vulnerable component.Read from the CVSS 3.1 vector

CVSS 3.1 metrics

To exploit it

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None

What it gets

Confidentiality
High
Integrity
High
Availability
High
Scope
Changed

Open this vector in the FIRST calculator ↗

Weakness
CWE-287, CWE-330, CWE-798 Improper Authentication · Use of Insufficiently Random Values · Use of Hard-coded Credentials
CVE
not assigned
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Also in AutoGPT
GHSA-57mf-wqwq-6g6x 8.2

My analysis of this finding: root cause, the vulnerable code, the impact and the fix, in the site’s format. The official advisory of record is linked above.

Affected versions

Package Ecosystem Vulnerable Fixed in
autogpt-platform-backend other >= 0.6.26, <= 0.7.4 0.8.0

Chain · GHSA-24q6-6h89-f9p7 · AutoGPT

Three steps from a secret committed to the public repository to any account, to admin, and to the third-party credentials those accounts hold. Each step is paired with the control that was supposed to stop it and was not there. Every fact is taken from the published advisory.

Text alternative. Step 00: the signing secret ships in the repository. backend/.env.default line 33 sets JWT_VERIFY_KEY to your-super-secret-jwt-token-with-at-least-32-characters-long, and the platform .env.default line 7 carries the same string as JWT_SECRET; the documented install copies these files into place. Absent control: nothing refuses to start on the default value, so a deployment runs on the committed secret. Step 01: forge a token offline. With the public secret the attacker signs an HS256 JWT whose sub claim is any victim's id and whose role claim is admin, in a few lines of PyJWT, with no contact with the target. Absent control: the token is a signature over its own claims, not a server-side session record, so nothing binds it to a login the server issued. Step 02: the backend accepts it. parse_jwt_token in autogpt_libs/auth/jwt_utils.py checks only the signature, the algorithm and the audience; verify_user then reads identity from the sub claim and treats role as a plain string, so a forged sub and role equal to admin clear both gates. Absent control: claims are trusted wholesale, and identity and privilege are self-asserted fields verified by nothing but a signature made with a public key. From there the forged token reaches any account (sub set to any id reads and mutates that user's agents, integrations and runs), admin-only endpoints (role set to admin clears the admin_only check), and, because the default ENCRYPTION_KEY is equally public, the stored OAuth tokens and provider API keys those accounts hold, decrypted at rest. Affects autogpt-platform-backend 0.6.26 through 0.7.4. Published 2026-10-05.

Scope changed. The vulnerable component is AutoGPT’s own authentication. The OAuth tokens and API keys it stores belong to the external providers each user connected, which are separate security authorities with credentials of their own, and the default-key chain hands them over. That is the S:C in the vector, and it is what carries a forged login past a single-app compromise.

A standalone PoC forges the token with PyJWT, signs it HS256 with the public secret, and runs it back through the same jwt.decode call the backend uses; it is accepted. Affects autogpt-platform-backend >= 0.6.26, <= 0.7.4. Published 2026-10-05.

Summary

The AutoGPT platform verifies every bearer token against JWT_VERIFY_KEY, and that key ships hardcoded in the default env files committed to the public repository. The signing secret is your-super-secret-jwt-token-with-at-least-32-characters-long, published in both .env.default and backend/.env.default. Anyone who knows it, which is anyone with a browser and the repo URL, can mint a token that the backend accepts as a fully authenticated user, including an admin. For a deployment left on the default, this is an unauthenticated takeover of the entire API.

Where it lives

Token verification happens in autogpt_libs/auth/jwt_utils.py. The decode uses the configured secret directly and only checks the signature, algorithm and audience:

def parse_jwt_token(token: str) -> dict[str, Any]:    settings = get_settings()    try:        payload = jwt.decode(            token,            settings.JWT_VERIFY_KEY,            algorithms=[settings.JWT_ALGORITHM],            audience="authenticated",        )        return payload

The bugthe token is checked against the key the repository ships

settings.JWT_VERIFY_KEY resolves to the shipped default. In backend/.env.default line 33:

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

The bugthe signing secret is published in the default env file

and the matching Supabase-side JWT_SECRET in the platform .env.default line 7 carries the same string. Nothing refuses to start on the default value.

Once a token is decoded, verify_user in the same file trusts its claims wholesale. The caller’s identity is just the sub claim, and admin is just a string field:

user_id = jwt_payload.get("sub") if not user_id:    raise HTTPException(status_code=401, detail="User ID not found in token") if admin_only and jwt_payload["role"] != "admin":    raise HTTPException(status_code=403, detail="Admin access required")

The bugidentity is the sub claim the attacker writesThe bugadmin is a field in the token the attacker writes

So a forged payload that sets sub to any victim’s id and role to admin passes both gates.

Impact

I wrote a standalone PoC that forges a token with PyJWT, signs it HS256 with the public secret, and runs it back through the same jwt.decode call the backend uses. It is accepted. Setting role to admin clears the admin_only check as well.

The chain needs no credentials and no prior access. Pick any sub and the backend treats the request as that user, reading and mutating their agents, integrations and runs. Set role to admin and the forged token reaches admin-only endpoints. Combined with the equally public default ENCRYPTION_KEY, an attacker can also pull and decrypt the stored OAuth tokens and provider API keys those accounts hold. This is a complete authentication bypass against any instance running the shipped configuration.

Fix

Treat the shipped secret as a fatal misconfiguration rather than a convenience. Refuse to start when JWT_VERIFY_KEY is empty or equal to a known published default, so a deployment cannot silently run on the committed value. The default env files should carry a placeholder that fails this check, with setup docs that force the operator to generate a fresh secret before first boot.

The record

Weakness
CWE-287 Improper Authentication
CWE-330 Use of Insufficiently Random Values
CWE-798 Use of Hard-coded Credentials
Affected
autogpt-platform-backend 0.6.26 to 0.7.4
Fixed in
0.8.0
Disclosure
2026-10-05 Published
Advisory
GHSA-24q6-6h89-f9p7
Also in AutoGPT
GHSA-57mf-wqwq-6g6x 8.2

About this writeup

Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the autogpt-platform-backend maintainers under coordinated disclosure and is credited as a reporter in GHSA-24q6-6h89-f9p7, published 2026-10-05.

All published findings: advisory index.