/

CVE-2026-58170

Severity:

HIGH RISK

(8.3)

Path Traversal (CWE-22) in Vibe-Trading Mandate Loader

CVE-2026-58170

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized Mandate Manipulation and Trading Control

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Vibe-Trading before version 0.1.10 constructs the proposal file path by directly joining a caller-supplied proposal identifier with the broker proposals directory, without sanitization.

An admitted caller can use path traversal sequences and a separately uploaded JSON file to make the system load an attacker-controlled live trading mandate, resulting in unrestricted control of trading ceilings when certain validation is skipped.

Affected context

This vulnerability appears in the live trading mandate commit logic, where proposal identifiers are treated as trusted path fragments and joined with the broker proposals directory.

It is relevant in deployments that expose a proposal commit endpoint to authenticated or admitted callers and maintain a shared filesystem for uploaded proposal JSON files.

Risk increases when the mandate loader does not normalize or constrain paths to a specific directory and when ceilings or related safety limits are optional or can be omitted from mandates.

Exploit preconditions

  • Attack surface: The mandate commit functionality, which accepts a proposal identifier and loads a corresponding JSON file.
  • Required access: Caller must be admitted or authenticated and able to use the file upload endpoint to place JSON files in predictable filesystem locations.
  • Trigger point: Providing a proposal identifier containing path traversal sequences (e.g., ../) so the application resolves to the attacker's uploaded JSON file instead of a legitimate proposal.
  • Why exploitation is possible: The code joins the user-supplied identifier with the proposals directory without sanitization or canonicalization, and ceilings validation is skipped when ceilings are absent, allowing full control over the committed trading mandate.

Why this happens

The core issue maps to CWE-22: Path Traversal, where user-controlled input is used directly to construct filesystem paths without validation.

In the affected mandate commit function, a caller-supplied proposal identifier is concatenated with a base directory and used to load JSON content as an authoritative trading mandate.

Without checks to strip traversal segments, enforce a fixed directory, or validate file names against an allowlist, an attacker can escape the intended proposals directory.

The business logic further assumes that mandates missing ceilings are valid and skips safety checks, compounding the path traversal flaw with insecure default behavior.

Potential impact

  • Attacker-controlled trading mandates may be loaded as if they were legitimate proposals.
  • Trading ceilings and risk limits can be removed or weakened, potentially enabling unbounded trades.
  • Unauthorized alteration of broker behavior and automated strategies could occur.
  • Financial loss, regulatory exposure, or market manipulation may result from executing malicious mandates.

General mitigation guidance

Effective mitigation centers on constraining filesystem access and hardening mandate validation logic.

Recommended patterns include:

  • Strictly validating proposal identifiers against an allowlist or well-defined format (e.g., UUIDs or numeric IDs) rather than accepting arbitrary path fragments.
  • Resolving paths to their canonical form and enforcing that they remain within a designated proposals directory, rejecting inputs that attempt traversal.
  • Decoupling business identifiers from filesystem names and using internal mappings for file resolution instead of direct user-controlled paths.
  • Treating the absence of ceilings or other safety constraints as invalid and enforcing mandatory risk controls in mandate schemas.
  • Applying least-privilege file access policies in the application layer so only intended directories are readable for mandate loading.

How teams detect issues like this

Organizations can identify similar vulnerabilities by:

  • Running static analysis for direct use of user-controlled strings in filesystem APIs (e.g., open, os.path.join) without normalization or checks.
  • Reviewing code paths where identifiers or request parameters are converted to file names or directories, looking for missing validation and traversal prevention.
  • Adding security-focused tests that attempt to supply ../ and absolute path sequences as identifiers and verifying that such requests are rejected.
  • Employing automated review tools or CI checks that flag unsafe path construction patterns and mandate schemas lacking required risk constraints.

Sources

SourceLink
github.comgithub.com/HKUDS/Vibe-Trading/commit/0ab701302f90e701c9dc558a898a217a376610c3
github.comgithub.com/HKUDS/Vibe-Trading/pull/256
github.comgithub.com/HKUDS/Vibe-Trading/releases/tag/v0.1.10
vulncheck.comvulncheck.com/advisories/vibe-trading-path-traversal-in-proposal-identifier-allows-forging-live-trading-mandates

Frequently asked

questions

Exploitation is typically limited to admitted or authenticated callers who can access the proposal commit and file upload endpoints, but within that scope it can yield significant control over live trading behavior.

No OS-level privileges are required; the attacker only needs application-level access to upload files and provide crafted proposal identifiers that reach the mandate loader.

Constrain path resolution to a fixed directory, validate proposal identifiers against a strict schema or mapping, and enforce mandatory ceilings and risk limits so mandates missing these fields are rejected.

Standardize on secure filesystem access patterns, avoid using raw user input to build paths, introduce schema-based validation for mandate JSON, and incorporate security checks and automated tests around any feature that loads configuration or trading logic from files.

Find out what's already
exploitable in your codebase.