CVE-2026-51859 in Bishenginfo

Summary

by MITRE • 10/01/2026

bisheng 2.3.0, 2.4.0, and 2.4.0-beta1 is vulnerable to directory traversal in save_download_file (src/backend/bisheng/core/cache/utils.py:290).

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 10/01/2026

The vulnerability identified in Bisheng versions 2.3.0 through 2.4.0-beta1 represents a critical security flaw rooted in improper input validation within the application's file handling mechanisms. Specifically, the issue resides in the save_download_file function located at src/backend/bisheng/core/cache/utils.py on line 290. This component is responsible for managing cached files and facilitating their retrieval or storage based on user requests. The core of the problem lies in the insufficient sanitization of directory paths provided by external inputs, which allows an attacker to manipulate file system operations beyond intended boundaries.

This technical flaw classifies as a Directory Traversal vulnerability, formally known under CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The underlying mechanism failure occurs because the application does not adequately verify or normalize the directory path before using it in file system calls. When an attacker supplies a maliciously crafted input containing sequence characters such as dot-dot-slash, the server interprets these sequences literally rather than stripping them out. Consequently, this enables the traversal of parent directories that should remain inaccessible to standard users. The lack of strict boundary enforcement means that relative path components are not resolved against the expected base directory before being applied to disk operations.

The operational impact of this vulnerability is severe and multifaceted. An authenticated attacker can exploit this flaw to read arbitrary files from the server's file system, potentially exposing sensitive configuration data, source code, environment variables containing secrets or API keys, and other critical application assets. In more advanced scenarios where write permissions are misconfigured alongside traversal capabilities, an attacker might achieve remote code execution by overwriting executable scripts or configuration files that the service subsequently loads. This compromises the confidentiality, integrity, and potentially the availability of the entire Bisheng deployment, undermining trust in the platform's security posture.

From a threat modeling perspective aligned with MITRE ATT&CK frameworks, this vulnerability facilitates initial access and credential dumping techniques often categorized under Tactic: Discovery or Tactic: Impact depending on whether data is merely exfiltrated or modified. It serves as an entry point for further lateral movement within the infrastructure if the compromised server holds privileged information relative to other networked systems. The exploitation requires minimal complexity, typically involving a single HTTP request with crafted parameters, making it highly attractive to automated scanning tools and opportunistic attackers alike.

Mitigation strategies must address both immediate remediation and long-term defensive coding practices. For organizations currently running affected versions, the most effective solution is to upgrade Bisheng to version 2.4.1 or later where this specific path traversal issue has been patched by implementing robust input validation and canonicalization of file paths before any disk operations occur. Developers should ensure that all user-supplied filenames are resolved against a predefined base directory using secure library functions like os.path.realpath in Python, followed by explicit checks to confirm the resulting absolute path remains within the allowed sandboxed directory structure. Additionally, employing principle of least privilege for application service accounts limits the potential damage even if traversal occurs. Regular security audits and static code analysis focused on file I/O operations are recommended to prevent similar flaws from emerging in future releases.

Responsible

MITRE

Reservation

06/08/2026

Disclosure

10/01/2026

Moderation

accepted

EPSS

0.00651

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!