{"id":"CVE-2026-50181","published":"2026-07-09T23:44:46Z","modified":"2026-07-14T01:25:33Z","title":"Langroid: Path traversal in the file tools allows read/write outside configured current directory","vendor":"langroid","product":"langroid","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00184,"percentile":0.04626,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-23","name":"Relative Path Traversal"}],"references":[{"url":"https://github.com/langroid/langroid/security/advisories/GHSA-fg23-3346-88f5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langroid/langroid/commit/56e2756ecab70a70a7e6edbee2f2187b8484683e","tags":["x_refsource_MISC"]}],"priority":{"score":10.9,"factors":[{"name":"EPSS percentile","points":0.93},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.97}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-07-09","earliestUrl":"https://github.com/chaitanyagarware/CVE-2026-50181","repos":[{"name":"chaitanyagarware/CVE-2026-50181","url":"https://github.com/chaitanyagarware/CVE-2026-50181","stars":1,"created":"2026-07-09"}]},"first":{"date":"2026-07-09","source":"PoC-in-GitHub","url":"https://github.com/chaitanyagarware/CVE-2026-50181"},"provenance":"source"},"vendorSlug":"langroid","affectedVersions":[{"vendor":"langroid","product":"langroid","versions":["< 0.64.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-07-14T01:24:55.646460Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langroid","vulnerableRanges":["<0.64.0"],"patched":["0.64.0"],"from":["GHSA-fg23-3346-88f5","PYSEC-2026-2578"],"provenance":"source"}],"summary":{"text":"Langroid, a framework for building large-language-model-powered applications, has a path traversal flaw in its ReadFileTool and WriteFileTool before version 0.64.0: these tools change to the configured curr_dir but do not verify that the user-supplied file path stays inside it. An attacker with local access and low privileges who can invoke these tools, whether directly, through a user-controlled tool call, or via an LLM agent, can supply relative traversal sequences such as ../ to read or write files outside the intended directory without any user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:32Z"},"euvd":{"id":"EUVD-2026-42763","exploited":false,"provenance":"source"}}