CVE-2026-50181
Langroid: Path traversal in the file tools allows read/write outside configured current directory
Also known as GHSA-fg23-3346-88f5, PYSEC-2026-2578
Mitigation
- Upgrade langroid to 0.64.0 or later.
Who should check
- Projects that depend on PyPI package langroid (< 0.64.0)
- Anyone running langroid < 0.64.0
Vulnerability facts
- Affected
- langroid < 0.64.0
- Fixed in
- 0.64.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.1 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.18% chance of exploitation in 30 days (percentile 5, 2026-11-26)
- CWE
- CWE-22, CWE-23
- Modified
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-50181. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-50181.md Affected: langroid < 0.64.0 Fixed in: 0.64.0 Steps: 1. Search this machine and project for langroid (PyPI), langroid: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-50181 being exploited?
There is no confirmed exploitation: CVE-2026-50181 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-50181?
High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-50181?
langroid < 0.64.0.
Is there a fix for CVE-2026-50181?
Yes. Fixed in 0.64.0. Upgrade langroid to 0.64.0 or later.
How do I check if I'm affected by CVE-2026-50181?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.