{"answers":{"affected":"3 open source packages ship an affected version, including langroid.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50181 exists.","fix":"Upgrade langroid to 0.64.0 or later.","what":"CVE-2026-50181 is a high-severity path traversal vulnerability in langroid, published on 9 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-50181 and fix it if it is affected.\n\nWhat it is: CVE-2026-50181 is a high-severity path traversal vulnerability in langroid, published on 9 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50181 exists.\n\nAffected packages and fixed versions:\n- langroid (PyPI): affected all versions; fixed in 0.64.0\n- langroid (PyPI): affected all versions; fixed in 0.64.0\n- langroid (PyPI): affected all versions; fixed in 0.64.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-50181/ (Markdown: https://insights.sbomify.com/CVE-2026-50181/index.md)","id":"CVE-2026-50181","markdown":"https://insights.sbomify.com/CVE-2026-50181/index.md","name":"CVE-2026-50181","record":{"aliases":["GHSA-fg23-3346-88f5","PYSEC-2026-2578"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Langroid Python library","requires_auth":"low_privilege","summary":"Attackers can read or write files outside the intended directory via path traversal in Langroid file tools, affecting LLM agent applications.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2026-07-09","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-07-09T00:30:51Z","kind":"github_poc","ref":"https://github.com/chaitanyagarware/CVE-2026-50181","stars":1,"title":"CVE-2026-50181 / GHSA-fg23-3346-88f5: Langroid path traversal advisory landing page"}],"tier":"weaponised"},"has_fix":true,"headline":"Langroid: Path traversal in the file tools allows read/write outside configured current directory","id":"CVE-2026-50181","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":2,"next":{"headline":"AVideo Has Unauthenticated Reflected XSS via $_GET['search'] in YouTubeAPI Gallery Pagination","id":"CVE-2026-50182"},"packages":[{"ecosystem":"PyPI","fixed":["0.64.0"],"introduced":["0"],"last_affected":[],"package":"langroid","purl":null,"source":"GHSA-fg23-3346-88f5"},{"ecosystem":"PyPI","fixed":["0.64.0"],"introduced":["0"],"last_affected":[],"package":"langroid","purl":"pkg:pypi/langroid","source":"GHSA-fg23-3346-88f5"},{"ecosystem":"PyPI","fixed":["0.64.0"],"introduced":["0"],"last_affected":[],"package":"langroid","purl":"pkg:pypi/langroid","source":"PYSEC-2026-2578"}],"prev":{"headline":"Langroid: SQLChatAgent _validate_query blocklist misses pg_read_file family enabling arbitrary file read","id":"CVE-2026-50180"},"products":["langroid"],"published":"2026-07-09","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-14","vendors":["langroid"]},"summary":"Attackers can read or write files outside the intended directory via path traversal in Langroid file tools, affecting LLM agent applications.","url":"https://insights.sbomify.com/CVE-2026-50181/"}