CVE-2026-50181 Details
Description
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.
A path traversal vulnerability has been identified in Langroid's file handling tools, specifically in versions through 0.63.0. The issue arises because the ReadFileTool and WriteFileTool do not properly enforce directory boundaries when performing file operations. Instead of validating that the final file path remains within the designated current directory, the tools allow traversal sequences to escape this boundary. This flaw can be exploited to read or write files outside the intended workspace, potentially exposing sensitive information or modifying files in unintended ways. The vulnerability is particularly concerning in applications that delegate file operations to an LLM agent or similar user-controlled context.
Users are advised to update to Langroid version 0.64.0 or later, where this vulnerability has been patched. In addition, applications should ensure that file paths are properly validated to prevent traversal outside of intended directory boundaries.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 10, 2026CISA-ADP
Assessed Jul 14, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/langroid/langroid/security/advisories/GHSA-fg23-3346-88f5 | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/langroid/langroid/commit/56e2756ecab70a70a7e6edbee2f2187b8484683e | [email protected] | Source CodeVendor |
| https://github.com/langroid/langroid/security/advisories/GHSA-fg23-3346-88f5 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-23 | Relative Path Traversal | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Langroid | <= 0.63.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 14, 2026 | CVE Modified | CISA-ADP |
| Jul 10, 2026 | New CVE Received | [email protected] |
Volerion