GitHub Advisoryadvisory · PyPI

GHSA-vmwq-8g8c-jm79 OpenChatBI has a Path Traversal Vulnerability in save_report Tool

HIGH Published 2026-03-02 Modified 2026-03-06 Official page ↗
Aliases
CVE-2026-28795
Ecosystem
PyPI
Packages
openchatbi
Severity
High
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Weaknesses
CWE-22
Reviewed
2026-03-02

Affected packages

• PyPI openchatbi: < 0.2.2 → fixed in 0.2.2

Description

Impact The `save_report` tool in `openchatbi/tool/save_report.py` suffers from a critical path traversal vulnerability due to insufficient input sanitization of the `file_format` parameter. The function only removes leading dots of `file_format` using `file_format.lstrip(".")` but allows path traversal sequences like `/../../` to pass through unchanged. When the filename is constructed via string concatenation in f"{timestamp}_{clean_title}.{file_format}" malicious path sequences are preserved, enabling attackers to write files outside the designated report directory. An attacker can manipulate the LLM to call the tool with a specific `file_format` to overwrite critical system files like `__init__.py`, potentially leading to remote code execution. Patches • Affected versions: <=0.2.1 • Patched versions: 0.2.2 (includes fix from PR #12: https://github.com/zhongyu09/openchatbi/pull/12) Workarounds No References • Issue #10: https://github.com/zhongyu09/openchatbi/issues/10 • PR #12: https://github.com/zhongyu09/openchatbi/pull/12

Related

Alias · CVE (1)

  • CVE-2026-28795 OpenChatBI is an intelligent chat-based BI tool powered by large language models, designed to help users query, analyze, and visualize data… vulnerability

Weakness · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References