# CVE-2026-50181: Langroid: Path traversal in the file tools allows read/write outside configured current directory

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 7% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-02T17:38:03.000Z
- Modified: 2026-07-14T02:16:55.357Z
- Also known as: GHSA-fg23-3346-88f5, PYSEC-2026-2578
- Weaknesses: CWE-22, CWE-23
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- langroid langroid: < 0.64.0
- langroid (PyPI): before 0.64.0

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- PyPA Advisory Database: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/langroid/langroid/security/advisories/GHSA-fg23-3346-88f5> (exploit, web)
- <https://github.com/langroid/langroid/commit/56e2756ecab70a70a7e6edbee2f2187b8484683e> (web)
- <https://github.com/langroid/langroid> (package)
- <https://pypi.org/project/langroid> (package)
- <https://github.com/advisories/GHSA-fg23-3346-88f5> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-50181> (advisory)

## Sources

- CVE List: [CVE-2026-50181](https://www.cve.org/CVERecord?id=CVE-2026-50181), CVE Terms of Use, modified 2026-07-14
- GitHub Advisory Database: [GHSA-fg23-3346-88f5](https://github.com/advisories/GHSA-fg23-3346-88f5), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-50181](https://nvd.nist.gov/vuln/detail/CVE-2026-50181), Public domain, modified 2026-07-14
- PyPA Advisory Database: [PYSEC-2026-2578](https://osv.dev/vulnerability/PYSEC-2026-2578), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-50181 · Whole record: https://cve.day/CVE-2026-50181.json · Rebuilt by cve.day 2026-11-25T22:59:27.583Z
