Severity:

HIGH RISK

(7.3)

Path Traversal in Axle-Bucamp MCP-Docusaurus Document Routes

CVE-2026-7788

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read/Write and Potential Data Exposure or Corruption

Severity:

HIGH RISK

(7.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

A path traversal vulnerability in Axle-Bucamp MCP-Docusaurus allows attackers to manipulate the DOCS_DIR/path argument in document-related routes to access files outside the intended documentation directory.

When exposed over the network, this can enable remote attackers to read, modify, or delete arbitrary files on the server within the privileges of the application process.

Affected context

This issue affects deployments of Axle-Bucamp MCP-Docusaurus using the update_document, continue_document, delete_document, and get_content routes in app/routes/document.py where user-controlled paths are joined with a base documentation directory (e.g., DOCS_DIR).

The vulnerability typically manifests when the application trusts client-supplied path fragments, such as file names or subdirectories, without robust normalization and enforcement that the final resolved path remains inside the intended documentation root.

Any environment exposing these routes over HTTP/HTTPS, especially in multi-user or internet-facing setups, may be at risk.

Exploit preconditions

  • Attack surface: HTTP/HTTPS endpoints mapped to update_document, continue_document, delete_document, and get_content in app/routes/document.py.
  • Required access: Ability to send crafted requests to the vulnerable routes (no local shell access required; authentication requirements depend on the specific deployment).
  • Trigger point: Supplying path values for DOCS_DIR/path (or equivalent parameters) that include traversal sequences or absolute/relative path tricks, which the server then uses directly for file operations.
  • Why exploitation is possible: The server-side logic appears to concatenate or otherwise combine user-controlled path fragments with a base directory without consistently normalizing, validating, and enforcing that the final filesystem path remains within the intended documentation directory, enabling traversal outside that directory.

Why this happens

The root cause aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The document routes accept path-like input from the client and use it to construct filesystem paths for reading, writing, or deleting documents.

Instead of treating these inputs as untrusted, the implementation likely:

  • Joins DOCS_DIR with user-supplied path segments, and
  • Performs insufficient checks against traversal tokens like ../, encoded variants, or absolute paths,

resulting in the ability for an attacker to escape the intended documentation root directory.

This pattern reflects a broader bug class where file APIs are directly driven by user input without strict canonicalization and constraint checks on the final resolved path.

Potential impact

  • Read access to files outside the intended documentation directory, potentially exposing configuration files, source code, or sensitive data.
  • Modification or deletion of arbitrary files writable by the application process, leading to data corruption or loss.
  • Overwriting application or configuration files, which could facilitate further compromise depending on deployment (e.g., influencing future code execution via modified scripts or configuration).
  • Disclosure of internal directory structure and system layout, increasing the effectiveness of subsequent attacks.

General mitigation guidance

Effective mitigation focuses on treating all path input as untrusted and constraining file operations to a well-defined directory:

  • Canonicalize and normalize user-supplied paths before use (e.g., resolving . and ..) and operate only on the canonical version.
  • Enforce that the resolved canonical path starts with the expected base directory (e.g., DOCS_DIR) before performing any filesystem operations.
  • Restrict path parameters to a strict, well-defined format (such as whitelisting file names from a known set or enforcing allowed characters and extensions) instead of accepting arbitrary path fragments.
  • Decouple user identifiers from raw filesystem paths; map logical document IDs to server-side-managed paths rather than allowing clients to specify paths directly.
  • Run the application with least-privilege filesystem permissions so that even if path validation fails, accessible files are minimized.
  • Where possible, separate document storage from critical system and configuration files (e.g., using a dedicated volume or chroot-like isolation).

How teams detect issues like this

Organizations can detect and monitor for this class of vulnerability using:

  • Static analysis: Rules that flag direct use of request parameters in file APIs (open, read, write, delete, os.path.join, Path operations) without canonicalization and base-path checks.
  • Code review: Look for routes or handlers where:
  • Path parameters are taken directly from the request, and
  • Combined with a base directory using string concatenation or naive joins, and
  • No subsequent verification ensures the final resolved path stays inside the intended directory.
  • Runtime monitoring: Web application firewalls (WAF) or request filters configured to detect suspicious path patterns (e.g., ../, URL-encoded traversal tokens, or absolute paths) targeting document routes.
  • Automated security testing: DAST or fuzzing tools configured to probe file-handling endpoints with traversal patterns and validate responses for unexpected file contents or error messages.

Sources

SourceLink
github.comgithub.com/Axle-Bucamp/MCP-Docusaurus/
github.comgithub.com/Axle-Bucamp/MCP-Docusaurus/issues/2
vuldb.comvuldb.com/submit/807746
vuldb.comvuldb.com/vuln/360994
vuldb.comvuldb.com/vuln/360994/cti

Frequently asked

questions

Yes. Because the affected routes are typically exposed over HTTP/HTTPS, a remote attacker who can reach these endpoints can attempt to exploit the path traversal by crafting malicious path parameters.

It depends on how the application is deployed. If the document routes are publicly accessible, no authentication may be required. In deployments where these routes are behind authentication, an attacker would need valid credentials, but even low-privileged users could potentially exploit the issue if their inputs are not constrained.

The most robust approach is to treat all path parameters as untrusted, resolve them to a canonical form, and enforce that the resulting path remains inside a predefined base directory. Replacing free-form path parameters with server-controlled IDs mapped to known-safe paths further reduces risk.

Establish a standard pattern for file access that:

  • Centralizes path construction and validation in shared utilities,
  • Prohibits direct use of user input in filesystem APIs,
  • Enforces least-privilege filesystem permissions, and
  • Includes automated checks in code review and CI (static analysis and tests) to detect unsafe file path handling before deployment.
Find out what's already
exploitable in your codebase.