/

CVE-2026-51860

Severity:

HIGH RISK

(7.5)

Directory Traversal (CWE-22) in Bisheng Task Exec Component

CVE-2026-51860

Deferred

Vulnerability type

Category:

Directory Traversal

CWE:

CWE-22

Impact:

Unauthorized File System Access

Severity:

HIGH RISK

(7.5)

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 directory traversal vulnerability in Bisheng can allow path-handling logic to access files outside the intended directory when attacker-controlled input is processed.

Under conditions where the vulnerable task execution component accepts or derives insufficiently constrained file paths, an attacker may read, modify, or otherwise interact with unauthorized filesystem locations.

Affected context

The issue affects Bisheng task execution functionality in versions 2.3.0, 2.4.0, and 2.4.0-beta1, specifically within src/backend/bisheng/linsight/domain/task_exec.py. Risk depends on whether externally influenced path values reach this component and on the permissions available to the Bisheng process.

Exploit preconditions

  • Attack surface: Task execution or related file-handling functionality exposed by the Bisheng backend
  • Required access: The ability to submit, influence, or trigger task input that affects a filesystem path
  • Trigger point: Processing of the attacker-influenced path by task_exec.py
  • Why exploitation is possible: Path values may not be sufficiently constrained to remain within the intended directory, allowing traversal beyond the expected filesystem boundary

Why this happens

The underlying bug is insufficient validation and containment of filesystem paths derived from untrusted or partially trusted input. When path components are accepted without reliably normalizing them and verifying that the resulting location remains within an approved base directory, traversal sequences can escape the intended directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Potential impact

  • An attacker may read sensitive files accessible to the Bisheng process
  • An attacker could modify or delete files when the process has corresponding permissions
  • Application configuration, credentials, or task data may be exposed
  • The vulnerability may support further compromise if accessible files contain secrets or executable content

General mitigation guidance

Mitigation generally focuses on making filesystem access independent of user-controlled path structure.

Common defensive patterns include:

  • Resolve paths against a fixed trusted base directory and verify containment after normalization
  • Prefer identifiers mapped to server-side filenames over accepting raw filesystem paths
  • Apply strict allowlists for permitted files, extensions, and directory locations
  • Reject traversal indicators, absolute paths, symbolic-link escapes, and ambiguous encodings as part of layered validation
  • Run the service with the minimum filesystem permissions required for its tasks
  • Use isolated workspaces and restrict access to sensitive host and application directories

How teams detect issues like this

Organizations commonly detect directory traversal risks through:

  • Static analysis rules for path joins involving request parameters, task fields, or other external inputs
  • Code review checks for missing canonicalization, containment verification, or symlink handling
  • Tests that exercise relative paths, absolute paths, encoded separators, and nested traversal attempts
  • Runtime monitoring for unexpected access outside approved application directories
  • Policy enforcement requiring approved path-resolution helpers for file operations

Automated code review and software composition tools may help identify risky path-handling patterns.

Sources

SourceLink
gist.github.comgist.github.com/Ro1ME/e4129afdd9af2ff1bdcecf27ec5098cf
github.comgithub.com/dataelement/bisheng/issues/1994

Frequently asked

questions

Exploitability depends on how Bisheng exposes task execution and whether an attacker can influence the relevant path input. A network-reachable task interface may make exploitation possible without local filesystem access.

The attacker generally needs permission to submit or trigger a task whose file path is processed by the vulnerable component. The exact requirement depends on authentication and authorization controls around that functionality.

Use server-controlled file identifiers or fixed workspace mappings instead of raw paths, then canonicalize and verify that every resolved path remains within an approved directory.

Apply centralized secure path-handling utilities, enforce least-privilege filesystem permissions, validate paths at trust boundaries, and include traversal-focused tests and code-review checks in development workflows.

Find out what's already
exploitable in your codebase.