/

CVE-2026-130154

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in Zyrabit Platform Vault Import

CVE-2026-130154

Received

Vulnerability type

Category:

Path Traversal and Arbitrary File Write

CWE:

CWE-22, CWE-306

Impact:

Arbitrary File Write and Potential Sensitive Data Disclosure

Severity:

CRITICAL RISK

(9.1)

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

Zyrabit Platform's vault import function does not adequately restrict the destination path, which may allow a caller to write files outside the intended vault. If an attacker can control the import paths, they may also copy readable files into the vault and retrieve their contents; unauthenticated network access is possible when the optional legacy extensions setting is enabled.

Affected context

The issue is in the import_to_vault function in zyrabit-slm/api-rag/app/domain/services/mcp_service.py. It occurs when caller-controlled destination_name is combined with the vault directory without ensuring the result remains inside that directory. The source path is also caller-controlled, so readable files may be copied into the vault and exposed through secure_query. When ENABLE_LEGACY_EXTENSIONS=true, the /mcp/rpc endpoint is registered without user authentication; this optional network exposure is disabled by default and is not needed for local invocation.

Exploit preconditions

  • Attack surface: The vault import tool, invoked locally or through the optional /mcp/rpc endpoint.
  • Required access: The caller must be able to invoke the tool; unauthenticated network access applies only when legacy extensions are enabled.
  • Trigger point: The tool copies the supplied source path to a destination formed from DOCS_DIR and destination_name.
  • Why exploitation is possible: The destination is not confined to the vault, and the content-pattern guard does not enforce that boundary. Files not matching the executable-pattern filter may pass it.

Why this happens

The import function treats a caller-controlled path component as a trusted destination without verifying that the resolved path remains within the intended vault. This is a path traversal weakness, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The separate lack of authentication on the optional legacy RPC route maps to CWE-306: Missing Authentication for Critical Function. Content-pattern filtering does not replace path confinement or access control.

Potential impact

  • An attacker may write files outside the intended vault.
  • Readable files may be copied into the vault and disclosed through retrieval.
  • If a writable destination is later used in an execution-triggering context, process execution could occur under the conditions described in the advisory.
  • When the optional legacy endpoint is enabled, unauthenticated callers may be able to invoke network tool calls.
  • Compromise of the service may affect data or other resources available to its runtime identity.

General mitigation guidance

Defensive patterns include resolving candidate destinations and enforcing that they remain within an explicitly configured vault root, rather than relying on string checks or content filters. Prefer controlled identifiers or server-generated destination names over caller-supplied paths, and limit source access to an allowlisted set of files. Require authentication and authorization for network-exposed tool calls, disable optional legacy routes when they are not needed, and run the service with least privilege and narrowly scoped filesystem permissions. If imported content may reach execution-sensitive locations, keep those locations separate from writable data areas.

How teams detect issues like this

  • Use static analysis to identify filesystem writes that combine a trusted directory with caller-controlled path components.
  • Review code for missing canonical-path containment checks, unrestricted source paths, and filtering used in place of path validation.
  • Check route registration and middleware policies to ensure every network-accessible tool endpoint enforces authentication and authorization.
  • Apply policy checks that restrict writable paths and flag configurations that enable legacy unauthenticated routes.
  • Monitor for unexpected writes outside the vault and unusual access to imported documents.

Sources

SourceLink
github.comgithub.com/Zyrabit-tech/zyrabit-SLM/commit/bb81be4d279a4680e26213c52041c003f9b78869
github.comgithub.com/Zyrabit-tech/zyrabit-SLM/pull/99
github.comgithub.com/Zyrabit-tech/zyrabit-SLM/releases/tag/v2.4.4
github.comgithub.com/Zyrabit-tech/zyrabit-SLM/security/advisories/GHSA-r4q8-hjfc-ggp2

Frequently asked

questions

The import function can use a caller-controlled destination that is not confined to the vault, creating a path traversal and arbitrary file write risk.

Not by default. Unauthenticated network tool calls are possible only when ENABLE_LEGACY_EXTENSIONS=true; local invocation does not depend on that setting.

Restrict destinations to canonical paths beneath a fixed vault root, use controlled names, and limit which source files the service can read.

Combine path-containment checks with least-privilege filesystem permissions, enforce authentication on network endpoints, and review file operations with static analysis and code review.

Find out what's already
exploitable in your codebase.