Advisory

GHSA-vmwq-8g8c-jm79

Also known as: CVE-2026-28795, PYSEC-2026-2794

Summary

OpenChatBI has a Path Traversal Vulnerability in save_report Tool

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-03-02 21:47 UTC
Modified
2026-07-13 16:42 UTC

Affected packages and fixes

openchatbi

PyPI · All systems

Affected

  • introduced 0, fixed 0.2.2 (ecosystem)

Fixed versions

0.2.2

Fix

  • Fixed version 0.2.2
    pip install --upgrade openchatbi==0.2.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences