CVE-2026-28795: OpenChatBI: Critical Path Traversal Vulnerability in save_report Tool of OpenChatBI
Impact The savereport tool in openchatbi/tool/savereport.py suffers from a critical path traversal vulnerability due to insufficient input sanitization of the fileformat parameter.
The function only removes leading dots of fileformat using fileformat.lstrip(".") but allows path traversal sequences like /../../ to pass through unchanged. When the filename is constructed via string concatenation in
f"{timestamp}{cleantitle}.{fileformat}"
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 fileformat 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
Other sources
OpenChatBI is an intelligent chat-based BI tool powered by large language models, designed to help users query, analyze, and visualize data through natural language conversations. Prior to version 0.2.2, the savereport tool in openchatbi/tool/savereport.py suffers from a critical path traversal vulnerability due to insufficient input sanitization of the fileformat parameter. This issue has been patched in version 0.2.2.
— MITRE