{"id":"CVE-2026-28795","aliases":["GHSA-vmwq-8g8c-jm79","PYSEC-2026-2794"],"title":"OpenChatBI has a Path Traversal Vulnerability in save_report Tool","summary":"OpenChatBI has a Path Traversal Vulnerability in save_report Tool","severity":"high","vendor":"openchatbi","product":"openchatbi","ecosystem":"pip","affected":["openchatbi < 0.2.2"],"patched":["openchatbi 0.2.2"],"published":"2026-03-02","updated":"2026-07-13","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-vmwq-8g8c-jm79","references":[{"url":"https://github.com/zhongyu09/openchatbi/security/advisories/GHSA-vmwq-8g8c-jm79"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28795"},{"url":"https://github.com/zhongyu09/openchatbi/issues/10"},{"url":"https://github.com/zhongyu09/openchatbi/pull/12"},{"url":"https://github.com/zhongyu09/openchatbi/commit/372a7e861da5159c3106d64d6f6edf8284db8c75"},{"url":"https://github.com/zhongyu09/openchatbi"}],"tags":["osv","pip"],"epss":0.00443,"epssPercentile":0.37816,"ingestedAt":"2026-07-13T18:58:03.676Z","slug":"CVE-2026-28795","body":"## Overview\n\n### Impact\nThe `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. \n\nThe 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 \n\n    f\"{timestamp}_{clean_title}.{file_format}\"\n\nmalicious path sequences are preserved, enabling attackers to write files outside the designated report directory. \n\nAn 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.\n\n\n### Patches\n- Affected versions:\n<=0.2.1\n- Patched versions:\n0.2.2 (includes fix from PR #12: https://github.com/zhongyu09/openchatbi/pull/12)\n\n### Workarounds\nNo\n\n### References\n- Issue #10: https://github.com/zhongyu09/openchatbi/issues/10\n- PR #12: https://github.com/zhongyu09/openchatbi/pull/12\n\n## Affected packages\n\n- `openchatbi < 0.2.2`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `openchatbi 0.2.2`","depth":"twilight","depthScore":41,"depthScoreParts":{"impact":41.3,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}