CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-V2F8-6655-7GRJ

GHSA-v2f8-6655-7grj: Remote Code Execution and Authentication Bypass in vibe-trading-ai

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 3, 2026·6 min read·17 visits

Executive Summary (TL;DR)

A critical vulnerability chain in vibe-trading-ai allows unauthenticated remote attackers to execute arbitrary shell commands as root within Docker containers, access historical operational logs, and upload malicious files because of a fail-open authorization design.

The vibe-trading-ai package prior to version 0.1.7 contains multiple critical security vulnerabilities including unauthenticated remote code execution (RCE) via session message injection, missing authentication on read endpoints, unrestricted file upload, insecure CORS policies, and sensitive key disclosure. Because the application default settings failed open, ran as root within Docker, and bound to all interfaces, remote unauthenticated attackers could compromise host environments containing sensitive trading data.

Vulnerability Overview

The vibe-trading-ai software is an automated cryptocurrency and financial trading framework designed to integrate artificial intelligence agent loops into real-time trading environments. The platform relies on a backend API server built on FastAPI to process strategy commands, configure active LLMs, and track backtesting execution. This backend exposes an API surface on port 8899 that interfaces with both the local user interface and background task executors.

In versions prior to 0.1.7, the default deployment architecture exposed a highly vulnerable attack surface. The software configured a fail-open security mechanism where authorization was bypassed if an environment secret was omitted. Furthermore, the default configuration files mapped the API port to all network interfaces (0.0.0.0) without restricting external traffic.

The resulting vulnerability footprint allows unauthenticated attackers to systematically exploit the application. Attackers can execute arbitrary terminal operations, retrieve historical trading databases, and overwrite core application modules. This occurs due to the execution of the agent container as root, combined with the lack of access controls on critical endpoints.

Root Cause Analysis

The primary root cause resides within the authentication dependency implemented in agent/api_server.py. The function require_auth() was designed to inspect incoming HTTP requests for credentials. However, it evaluated the presence of the system-wide secret key before performing validation. If the API_AUTH_KEY environment variable was empty or commented out in the configuration files, the function returned None instead of raising an HTTP exception.

Because the distributed .env.example file contained a commented-out authorization key, most standard installations defaulted to an unauthenticated mode. This fail-open logic meant that any client could access routes decorated with authentication dependencies. Simultaneously, the development team implemented read endpoints (GET routes) without adding authorization controls, allowing unauthorized data access even when write operations were secured.

The ultimate mechanism for arbitrary code execution relies on the application's design as an autonomous agent. The framework exposes a BashTool within the agent loop to execute operating system commands. This tool executes raw strings using python's subprocess.run(shell=True). By sending a natural language prompt instructing the agent to run a shell command, an unauthenticated network observer can execute commands inside the host environment.

Code Analysis and Patch Review

A technical evaluation of the differences between the vulnerable code and the official patch in commit 9454d4a27a763b80e1d6eb5763b86c88e9e4e714 reveals a multi-layered security hardening strategy. The vulnerability in agent/api_server.py was remediated by rewriting the authentication verification logic to reject connections when the API key is not configured.

# Vulnerable authentication implementation (pre-0.1.7)
def require_auth(cred: HTTPAuthorizationCredentials = Security(_security)):
    api_key = _configured_api_key()
    if not api_key:
        return  # Fail-open: returns None and allows access if unset
    if not cred or cred.credentials != api_key:
        raise HTTPException(status_code=401, detail="Invalid or missing API key")
# Patched authentication implementation (0.1.7)
def _validate_api_auth(
    *,
    request: Request,
    cred: Optional[HTTPAuthorizationCredentials],
    query_api_key: Optional[str] = None,
    allow_query: bool = False,
) -> None:
    api_key = _configured_api_key()
    if not api_key:
        if _is_local_client(request):
            return  # Permits local loopback development only
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="API_AUTH_KEY is required for non-local API access",
        )
 
    token = _auth_credential_from_header_or_query(cred, query_api_key, allow_query=allow_query)
    if not token or not hmac.compare_digest(token, api_key):
        raise HTTPException(status_code=401, detail="Invalid or missing API key")

Additionally, the developers implemented an Abstract Syntax Tree (AST) validation checker inside agent/backtest/runner.py via _validate_signal_engine_source. This mechanism parses Python files prior to import to confirm they do not contain top-level execution statements. This mitigates the risk of running unauthorized actions through backtesting modules. Finally, the Dockerfile was updated to run under a non-root system user named vibe instead of defaulting to root root permissions.

Exploitation Methodology

To execute commands on a vulnerable instance, an attacker must first locate an exposed endpoint on port 8899. Because of the open port binding configuration, this can be achieved using a standard network scanner. Once a host is identified, the attacker initiates a stateful session and triggers the execution chain through the agent's interactive interfaces.

First, the attacker creates an active session using the /sessions route:

curl -s -X POST http://<target>:8899/sessions \
  -H 'Content-Type: application/json' \
  -d '{}'

The server responds with a JSON payload containing a unique session identifier (session_id). The attacker uses this identifier to send a malicious instructions object to the agent loop via the message endpoint. The instructions request that the agent process a command using the system terminal:

curl -s -X POST "http://<target>:8899/sessions/<session_id>/messages" \
  -H 'Content-Type: application/json' \
  -d '{"content":"Please use the shell execution tool to run the command: id && cat /etc/passwd"}'

Because the agent executes inside a Docker container configured without a designated USER field, the payload runs with root administrative rights. The attacker can then request the resulting terminal output by querying the messages log endpoint GET /sessions/<session_id>/messages after a brief processing interval.

Impact Assessment

The impact of this vulnerability is critical. Successful exploitation gives an unauthenticated remote attacker complete administrative control over the host running the application. Attackers can execute commands, steal credentials, and compromise downstream services connected to the container.

Since the software is used for algorithmic trading, the target container typically stores high-value assets. These assets include API secret keys for exchanges, active private keys for web3 wallets, and database records containing historical transaction records. Access to these resources allows attackers to steal funds or disrupt automated trading systems.

The vulnerability also exposes host networks to further compromise. Attackers can leverage the compromised container as a pivot point to map, scan, and attack other systems within the private internal network. The high risk is reflected in the perfect CVSS base score of 10.0.

Remediation and Defense-in-Depth

Securing a deployment requires updating the installation packages and hardening network configurations. Users should upgrade the application package to version 0.1.7 or later to implement the authentication and filesystem controls. This can be accomplished through standard pip upgrade processes.

pip install --upgrade vibe-trading-ai

In addition to the software upgrade, developers must modify deployment configurations. The docker-compose.yml file should be updated to restrict access to port 8899. Binding the port explicitly to the local loopback address (127.0.0.1:8899:8899) prevents external systems from communicating with the API endpoint.

Finally, users must configure a strong API key in the environment variables. Setting the API_AUTH_KEY variable with a high-entropy secret ensures the API validates authorization headers for all external requests. If shell execution features are not required, administrators should disable them by setting VIBE_TRADING_ENABLE_SHELL_TOOLS=0 in the environment configuration.

Fix Analysis (1)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Affected Systems

vibe-trading-ai pip package deploymentsHKUDS Vibe-Trading local and container installations

Affected Versions Detail

Product
Affected Versions
Fixed Version
vibe-trading-ai
HKUDS
>= 0.1.0, < 0.1.70.1.7
AttributeDetail
CWE IDCWE-306, CWE-862, CWE-434, CWE-346, CWE-200
Attack VectorNetwork (Unauthenticated API Request)
CVSS v3.1 Score10.0 (Critical)
ImpactRemote Code Execution (RCE) / Full System Compromise
Exploit StatusProof of Concept (PoC) documented in research
Docker Default Userroot (pre-0.1.7)

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1505.003Server Software Component: Web Shell
Persistence
T1059Command and Scripting Interpreter
Execution
CWE-306
Missing Authentication for Critical Function

The application fails to authenticate critical pathways when specific environment secrets are not configured, and fails to authenticate read endpoints entirely, leading to exposure of administrative interfaces and unauthenticated command execution via integrated agent scripts.

Vulnerability Timeline

Vulnerability identified in API authorization structure and default Docker configuration profiles.
2025-01-20
Mitigation commit 9454d4a27a763b80e1d6eb5763b86c88e9e4e714 checked in to repository.
2025-01-22
Official release of version 0.1.7 containing full remediation patches.
2025-01-22
GitHub Security Advisory published detailing the vulnerability chain.
2025-01-23

References & Sources

  • [1]Vibe-Trading Source Code Repository
  • [2]GitHub Security Advisory GHSA-v2f8-6655-7grj
  • [3]Vibe-Trading Release v0.1.7 Changes

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-63182
8.1

CVE-2026-63182: XML Signature Wrapping Authentication Bypass in LightSAML

CVE-2026-63182 is a high-severity XML Signature Wrapping (XSW) vulnerability in LightSAML (litesaml/lightsaml), a PHP library implementing SAML 2.0 data models and cryptographic verification. An architectural discrepancy between how LightSAML deserializes direct child assertions and how the underlying robrichards/xmlseclibs library resolves XML document fragment identifiers allows an attacker with a valid signed assertion to forge arbitrary SAML identity claims and bypass authentication.

Alon Barad
Alon Barad
2 views•11 min read
•about 2 hours ago•CVE-2026-119351
6.3

CVE-2026-119351: Cross-Context Cache Leak via Delayed Inner Stream Metadata in Next.js

A race condition and improper synchronization vulnerability (CWE-362) exists in Next.js versions 16.2.0 prior to 16.4.5 when Cache Components ('use cache' directive) are enabled. When an outer cached function calls a nested cached function that reads dynamic root parameters via 'next/root-params' and returns an object containing pending promises, React Flight can resolve and deliver the ready portion of the payload before the inner cache finishes publishing its root parameter dependencies. Consequently, the outer cache entry finalizes and persists under a cache key that omits the root parameter dependencies, causing the first written cache entry to be served across requests with different root parameter values and bypassing nested cache invalidation rules.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 3 hours ago•CVE-2026-68934
8.7

CVE-2026-68934: OS Command Injection in code-review-mcp-server via Unsafe Shell Execution

A remote OS command injection vulnerability (CWE-78) exists in code-review-mcp-server prior to version 1.5.3. The application passes caller-controlled tool parameters directly into Node.js child_process.execSync() calls without proper neutralization. An attacker or compromised LLM agent invoking tools such as getLocalGitDiff, codeReview, createPR, or getPRTemplate can inject arbitrary shell commands that execute with the privileges of the MCP server host process.

Alon Barad
Alon Barad
5 views•11 min read
•about 4 hours ago•CVE-2026-86046
7.1

CVE-2026-86046: Arbitrary File Write via Path Traversal in termux-sync Restore Workflow

A path traversal vulnerability (CWE-22) in termux-sync prior to version 1.2.4 allows an attacker to overwrite arbitrary files within the Termux environment during the backup restoration process. The flaw stems from the application trusting attacker-controlled extraction paths defined in the backup's manifest.json file, failing to validate archive members against directory traversal sequences during tar extraction, and using unsanitized backup names when constructing temporary directories. If a user restores a malicious backup archive from local storage, shared folders, GitHub, or Google Drive, an attacker can overwrite sensitive configuration files such as shell startup scripts or local binaries, resulting in arbitrary code execution under the privileges of the Termux user.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 5 hours ago•CVE-2026-129296
6.5

CVE-2026-129296: Path Traversal in SpamScope mail-parser Attachment Extraction

SpamScope mail-parser versions 3.8.0 prior to 4.6.0 contain a path traversal vulnerability (CWE-22) within the write_attachments() and write_sample() functions. The library passes untrusted attachment filenames directly into os.path.join() without stripping directory components, validating path containment, or verifying symbolic links. An attacker can send a crafted email containing relative path traversal sequences or absolute filesystem paths in the Content-Disposition header to write or overwrite arbitrary files accessible to the parsing process.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 6 hours ago•CVE-2026-129295
7.5

CVE-2026-129295: Polynomial Regular Expression Denial of Service (ReDoS) in SpamScope mail-parser

A Regular Expression Denial of Service (ReDoS) vulnerability exists in SpamScope mail-parser versions 4.2.0 prior to 4.6.1. Two separate regular expressions evaluated during standard email header parsing exhibit quadratic to cubic backtracking complexity when processing headers padded with whitespace or angle brackets. An unauthenticated remote attacker can exploit this flaw by sending a small, RFC-compliant email message, causing parsing worker threads or processes to stall at 100% CPU utilization for extended periods.

Amit Schendel
Amit Schendel
3 views•10 min read