Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-58170

CVE-2026-58170: Vibe-Trading Path Traversal Vulnerability

CVE-2026-58170 is a path traversal flaw in Vibe-Trading before 0.1.10 that allows attackers to load malicious JSON files as trading mandates. This article covers the technical details, affected versions, and steps.

Published:

CVE-2026-58170 Overview

CVE-2026-58170 is a path traversal vulnerability [CWE-22] in Vibe-Trading versions before 0.1.10. The flaw resides in agent/src/live/mandate/commit.py, where the application joins a caller-supplied proposal identifier onto the broker proposals directory without sanitization. An attacker who can reach the mandate commit endpoint can supply traversal sequences in the proposal identifier to load an attacker-controlled JSON file as an authoritative live trading mandate.

Combined with the file upload endpoint, an admitted caller can write a JSON payload to a known location and traverse to it. Because ceilings validation is skipped when ceilings are absent, the attacker fully controls the committed mandate.

Critical Impact

Authenticated attackers can forge live trading mandates and bypass ceiling-based safety controls, compromising the integrity and availability of automated trading operations.

Affected Products

  • HKUDS Vibe-Trading versions prior to 0.1.10
  • The agent/src/live/mandate/commit.py mandate commit component
  • Deployments exposing the file upload endpoint to admitted callers

Discovery Timeline

  • 2026-06-30 - CVE-2026-58170 published to the National Vulnerability Database (NVD)
  • 2026-07-01 - Last updated in NVD database

Technical Details for CVE-2026-58170

Vulnerability Analysis

The vulnerability stems from unsanitized concatenation of a user-controlled proposal identifier with the broker proposals directory path. The application uses this composed path to load the JSON document that will be committed as a live trading mandate. Because no allowlist or canonicalization check is applied, sequences such as ../ in the proposal identifier redirect the file load to arbitrary locations on disk.

The issue is amplified by two adjacent design flaws. First, the platform exposes a file upload endpoint that admitted callers can use to place attacker-controlled JSON content at predictable filesystem paths. Second, the ceilings validation logic is bypassed entirely when the ceilings field is absent from the loaded mandate. An attacker chains these behaviors to upload a crafted JSON file, reference it via traversal, and commit a mandate without any trading limit enforcement.

Root Cause

The root cause is missing input validation on the proposal identifier before it is used in path construction. The code relies on the identifier being a well-formed opaque token but performs no character filtering, canonicalization, or containment check against the intended broker proposals directory.

Attack Vector

An authenticated caller with permission to submit proposals and upload files crafts a proposal identifier that traverses out of the broker proposals directory. They pair this with a JSON file uploaded through the file upload endpoint at a known path. The commit routine loads the attacker-controlled JSON as an authoritative mandate and skips ceilings validation because the field is omitted.

python
 import json
 import logging
 import os
+import re
 import uuid
 from datetime import datetime, timedelta, timezone
 from pathlib import Path

Source: GitHub Commit 0ab70130 — the patch introduces the re module to support strict identifier validation before path construction in agent/src/live/mandate/commit.py.

Detection Methods for CVE-2026-58170

Indicators of Compromise

  • Proposal identifiers in application logs containing ../, ..\, URL-encoded %2e%2e%2f, or absolute path prefixes.
  • Mandate commit events referencing JSON files located outside the configured broker proposals directory.
  • Committed mandates whose ceilings field is missing or null, especially when correlated with recent file uploads.
  • File upload activity placing .json files in directories reachable via traversal from the proposals path.

Detection Strategies

  • Inspect request bodies to the mandate commit endpoint for proposal identifier fields containing path separator characters or dot sequences.
  • Compare the resolved absolute path of each loaded proposal file against the canonical broker proposals directory and alert on mismatches.
  • Correlate file upload events with subsequent mandate commits that reference identifiers created within a short time window.

Monitoring Recommendations

  • Log the canonicalized filesystem path used for every mandate load and retain it for audit review.
  • Alert on mandate commits where the ceilings validation branch is skipped due to absent ceilings.
  • Monitor authentication events for the admitted-caller role and flag deviations from established behavioral baselines.

How to Mitigate CVE-2026-58170

Immediate Actions Required

  • Upgrade Vibe-Trading to version 0.1.10 or later, which contains the fix in agent/src/live/mandate/commit.py.
  • Audit historical mandate commits for proposals loaded from paths outside the broker proposals directory and revoke any suspicious mandates.
  • Restrict access to the mandate commit and file upload endpoints to the minimum set of trusted operators until patching is complete.

Patch Information

The upstream fix is delivered in Vibe-Trading release v0.1.10 via pull request #256 and commit 0ab70130. The patch adds regex-based validation of proposal identifiers before they are joined into a filesystem path. See the VulnCheck advisory for additional context.

Workarounds

  • Enforce a strict allowlist for proposal identifier characters at an upstream proxy or web application firewall, rejecting any request containing path separators or dot sequences.
  • Require the ceilings field to be present and non-empty on every committed mandate, rejecting proposals that omit it.
  • Isolate the file upload directory on a separate filesystem or mount that cannot be reached from the broker proposals directory via relative traversal.
bash
# Example WAF rule fragment: reject proposal identifiers containing traversal patterns
SecRule ARGS:proposal_id "@rx (\.\.|/|\\|%2e%2e|%2f|%5c)" \
    "id:1026058170,phase:2,deny,status:400,log,msg:'CVE-2026-58170 traversal in proposal_id'"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.