Langroid — это платформа для создания приложений на основе моделей большого языка. До версии 0.64.0 `ReadFileTool` и `WriteFileTool` Langroid рассматривали `curr_dir` как предполагаемую границу рабочего каталога для файловых операций. Однако инструменты только меняют рабочий каталог процесса на «curr_dir», а затем работают с предоставленным пользователем «file_path», не разрешая и не обеспечивая, чтобы окончательный путь оставался внутри «curr_dir».
В результате вызывающая программа может предоставить последовательности обхода пути, такие как `../secret.txt` для чтения файлов за пределами настроенного текущего каталога или `../writing_by_tool.txt` для записи файлов вне этого каталога. Это может повлиять на приложения, которые предоставляют файловые инструменты Langroid агенту LLM, вызову управляемого пользователем инструмента или делегированному агенту кодирования/документации, полагаясь при этом на `curr_dir` для ограничения доступа к файлам в каталоге проекта/рабочей области. Версия 0.64.0 исправляет проблему.
Показать оригинальное описание (EN)
Langroid is a framework for building large-language-model-powered applications. Prior to version 0.64.0, Langroid's `ReadFileTool` and `WriteFileTool` appear to treat `curr_dir` as the intended working-directory boundary for file operations. However, the tools only change the process working directory to `curr_dir` and then operate on the user-supplied `file_path` without resolving and enforcing that the final path remains inside `curr_dir`. As a result, a tool caller can supply path traversal sequences such as `../secret.txt` to read files outside the configured current directory, or `../written_by_tool.txt` to write files outside that directory. This can impact applications that expose Langroid file tools to an LLM agent, user-controlled tool call, or delegated coding/documentation agent while relying on `curr_dir` to restrict file access to a project/workspace directory. Version 0.64.0 patches the issue.
Характеристики атаки
Последствия
Строка CVSS v3.1