Severity:

HIGH RISK

(7.3)

Path Traversal in BioinfoMCP Upload Endpoint

CVE-2026-7398

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read/Write via Path Traversal

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 the BioinfoMCP upload endpoint allows remote attackers to manipulate the Name parameter and influence filesystem paths on the server.

If exploited, this can enable reading or overwriting files outside the intended upload directory, potentially leading to data exposure or system compromise under certain configurations.

Affected context

The weakness arises in the Upload function of bioinfo_mcp_platform/app.py, where user-supplied Name values are incorporated into filesystem paths without sufficient normalization or restriction.

Any BioinfoMCP deployment that exposes this upload endpoint to remote clients and relies on server-side file storage for uploads may be affected, especially if the application runs with permissions that grant broader access to the host filesystem.

Exploit preconditions

  • Attack surface: Remote HTTP access to the BioinfoMCP upload endpoint.
  • Required access: Ability to send crafted upload requests containing a malicious Name parameter; no special privileges are implied by the description.
  • Trigger point: Submission of an upload request where the Name includes traversal sequences (e.g., directory separators, .. segments) or absolute path constructions.
  • Why exploitation is possible: The server trusts the Name value when constructing filesystem paths, and lacks robust canonicalization and enforcement of a fixed, confined upload directory, enabling navigation outside the intended storage path.

Why this happens

This vulnerability is rooted in improper handling of user-controlled file path components, mapping directly to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The Upload function likely concatenates or interpolates the Name parameter into a filesystem path without:

  • Canonicalizing the resulting path,
  • Validating that it remains inside an allowed base directory, or
  • Rejecting traversal sequences and unsafe characters.

As a result, attackers can craft Name values that cause the application to read from or write to locations outside the intended upload directory, depending on how the function is used (file creation, overwrite, or read-back).

Potential impact

  • Reading sensitive files from the server's filesystem, subject to process permissions.
  • Overwriting or creating files in unintended directories, which can be leveraged for data tampering.
  • Planting or modifying application or configuration files where the process has write access, potentially leading to code execution in some deployments.
  • Disrupting service by corrupting application data, logs, or other critical resources.
  • Assisting in lateral movement by exposing credentials, keys, or internal configuration secrets stored on disk.

General mitigation guidance

Effective mitigation focuses on strictly constraining how user input influences filesystem paths and reducing the impact of any path misuse:

  • Enforce a fixed, server-side controlled upload directory and never allow clients to specify full or partial paths.
  • Use path-joining utilities that operate on a predefined base directory and then canonicalize the resulting path to its absolute form.
  • After canonicalization, validate that the final path is still inside the intended upload root (e.g., by checking prefixes or using directory traversal guard functions).
  • Reject Name values containing directory separators, .. segments, or other unsafe characters, and apply a strict whitelist for allowed filename patterns.
  • Treat uploaded names as opaque identifiers (e.g., generate server-side random file names) and store the original user-facing name in metadata instead of the filesystem path.
  • Run the application with least-privilege OS permissions so that even if path traversal occurs, access is limited to a constrained directory tree.

How teams detect issues like this

Organizations can identify and monitor this class of weakness using multiple approaches:

  • Static analysis: Configure rules to flag filesystem operations where user-controlled input is concatenated into paths without validation or canonicalization, especially around upload or download endpoints.
  • Code review: Look for patterns such as direct string concatenation of request parameters into file paths, absence of checks for .. segments, or missing enforcement of a fixed base directory for uploads.
  • Security testing: Use dynamic application security testing (DAST) or manual penetration testing to send crafted filenames with traversal sequences and observe whether responses or side effects indicate access outside the intended directory.
  • Runtime monitoring: Instrument logging around file access operations to capture suspicious paths containing traversal patterns or unexpected directories, and correlate them with incoming requests for anomaly detection.

Sources

SourceLink
github.comgithub.com/florensiawidjaja/BioinfoMCP/
github.comgithub.com/florensiawidjaja/BioinfoMCP/issues/2
vuldb.comvuldb.com/submit/803488
vuldb.comvuldb.com/vuln/360122
vuldb.comvuldb.com/vuln/360122/cti

Frequently asked

questions

Yes. The issue exists in a remotely accessible upload endpoint, and exploitation can be carried out by sending crafted HTTP requests with malicious Name values.

An attacker generally needs only the ability to interact with the upload endpoint over the network. No additional authentication requirements are indicated in the description, though real-world deployments might add access controls.

Constrain all file operations to a server-side controlled base directory, generate or sanitize filenames on the server, canonicalize and validate paths before use, and reject any input that cannot be safely mapped to a valid filename within the allowed directory.

Adopt secure file-handling patterns by design: treat all path components derived from user input as untrusted, apply strict whitelisting and canonicalization, enforce least-privilege for the process, and incorporate static/dynamic security testing focused on path traversal into the development and CI/CD pipelines.

Find out what's already
exploitable in your codebase.