Vibe-Trading FastAPI unauthenticated access and RCE chain

Severity: critical · CVSS 10 · Published 2026-10-02

Vibe-Trading is an AI agent platform that executes shell commands and file operations via a FastAPI server. The default configuration leaves all API endpoints unauthenticated—even when an API key is configured, read endpoints remain unprotected—allowing an unauthenticated attacker to enumerate sessions, upload arbitrary executable files, and chain these into remote code execution as root inside the container. Browser-based attacks from a shared developer machine can also exploit CORS misconfiguration to silently trigger these actions.

Technologies: HKUDS Vibe-Trading, vibe-trading-ai (PyPI). Vendors: HKUDS, PyPI.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Critical severity, with a CVSS score of 10, published 2 October 2026.
Which products and versions are affected?
HKUDS Vibe-Trading 0.1.6 and prior; vibe-trading-ai (PyPI) >= 0.1.0, < 0.1.7.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Ensure `API_AUTH_KEY` is configured with a strong value; apply authentication to all read endpoints; convert the file upload extension blocklist to an allowlist and restrict to safe document types; tighten CORS origins to only the bundled Vite dev port; replace the `_mask_secret()` function with a fixed placeholder or boolean flag to avoid exposing API key bytes; run the container with a non-root `USER` directive. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked over the network, in a hosted service.
Am I affected?
Check whether you run HKUDS Vibe-Trading or vibe-trading-ai (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

Ensure `API_AUTH_KEY` is configured with a strong value; apply authentication to all read endpoints; convert the file upload extension blocklist to an allowlist and restrict to safe document types; tighten CORS origins to only the bundled Vite dev port; replace the `_mask_secret()` function with a fixed placeholder or boolean flag to avoid exposing API key bytes; run the container with a non-root `USER` directive.

Technical details

The vulnerability stems from `require_auth()` returning `None` immediately when `API_AUTH_KEY` environment variable is unset (line 303), making all `Depends(require_auth)` decorators no-ops. Read endpoints lack authentication entirely and return full session histories with sensitive tokens. File upload accepts dangerous executable-adjacent extensions (.py, .sh, .yaml) via a denylist-based filter, returns the full server path, and runs unauthenticated. The container ships without a `USER` directive, running the FastAPI process as root. CORS middleware permits credentialed requests from localhost-served pages, and settings endpoints leak first-4 and last-4 characters of configured API keys via `_mask_secret()`.

Affected products

  • HKUDS Vibe-Trading 0.1.6 and prior

Timeline

  • 2026-10-02: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.