Langroid: Path traversal in the file tools allows read/write outside configured current directory
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langroid | langroid | before 0.64.0 | 0.64.0 | Patch available | CNA |
| — | langroid (PyPI) | before 0.64.0 | 0.64.0 | Patch available | GHSA-fg23-3346-88f5 |
- langroid Vendorlangroid Affected before 0.64.0 Fixed in 0.64.0 Patch available CNA
- langroid (PyPI) Vendor— Affected before 0.64.0 Fixed in 0.64.0 Patch available GHSA-fg23-3346-88f5
Remediation
- Fix · CNA langroid (langroid) Fixed in 0.64.0
- Fix · GHSA-fg23-3346-88f5 langroid (PyPI) Fixed in 0.64.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-50181
- 2026-10-03 Alias added: GHSA-fg23-3346-88f5
References
More langroid vulnerabilities
- TI-2026-39575 Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent CVSS 3.1CRITICAL 10.0
- TI-2026-20919 Langroid has Prompt to SQL Injection, Leading to RCE CVSS 3.1CRITICAL 9.8
- TI-2026-20592 Langroid has WAF Bypass Leading to RCE in TableChatAgent CVSS 4.0CRITICAL 9.4
- TI-2025-29395 Langroid has a Code Injection vulnerability in TableChatAgent CVSS 3.1CRITICAL 9.8
- TI-2026-40145 Injection in langroid CVSS 4.0CRITICAL 9.2
- TI-2026-39566 Langroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file calls CVSS 4.0CRITICAL 9.3
Sources
- CVE-2026-50181 · CVE Program
- CVE-2026-50181 · NVD
- FIRST EPSS
- GHSA-fg23-3346-88f5 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences