{"answers":{"affected":"3 open source packages ship an affected version, including langchain-core. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-34070 exists.","fix":"Upgrade langchain-core to 1.2.22 or later.","what":"CVE-2026-34070 is a high-severity path traversal vulnerability in langchain-ai langchain, published on 31 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-34070 and fix it if it is affected.\n\nWhat it is: CVE-2026-34070 is a high-severity path traversal vulnerability in langchain-ai langchain, published on 31 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-34070 exists.\n\nAffected packages and fixed versions:\n- langchain-core (PyPI): affected all versions; fixed in 1.2.22\n- langchain-core (PyPI): affected all versions; fixed in 1.2.22\n- langchain-core (PyPI): affected all versions; fixed in 1.2.22\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-34070/ (Markdown: https://insights.sbomify.com/CVE-2026-34070/index.md)","id":"CVE-2026-34070","markdown":"https://insights.sbomify.com/CVE-2026-34070/index.md","name":"CVE-2026-34070","record":{"aliases":["CLSA-2026-1776126826","ECHO-34c7-ca18-1a8c","GHSA-qh6h-p6c9-ff54","PYSEC-2026-2193","ROOT-APP-PYPI-CVE-2026-34070"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"LangChain Core library","requires_auth":"none","summary":"Attackers can read arbitrary files on the host filesystem by exploiting path traversal in LangChain Core's legacy prompt loading functions.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"langchain_core","vendor":"langchain"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"LangChain is a framework for building agents and LLM-powered applications. Prior to version 1.2.22, multiple functions in langchain_core.prompts.loading read files from paths embedded in deserialized config dicts without validating against directory traversal or absolute path injection. When an application passes user-influenced prompt configurations to load_prompt() or load_prompt_from_config(), an attacker can read arbitrary files on the host filesystem, constrained only by file-extension checks (.txt for templates, .json/.yaml for examples). This issue has been patched in version 1.2.22.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2026-03-26","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-03-26T13:39:47Z","kind":"github_poc","ref":"https://github.com/Rickidevs/CVE-2026-34070","stars":0,"title":"I Found a Zero-Day Vulnerability in langchain — Here’s How It Went"}],"tier":"weaponised"},"has_fix":true,"headline":"LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions","id":"CVE-2026-34070","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"Stirling-PDF has Stored Cross Site Scripting (XSS) via EML-to-HTML Export","id":"CVE-2026-34071"},"packages":[{"ecosystem":"PyPI","fixed":["1.2.22"],"introduced":["0"],"last_affected":[],"package":"langchain-core","purl":null,"source":"GHSA-qh6h-p6c9-ff54"},{"ecosystem":"PyPI","fixed":["1.2.22"],"introduced":["0"],"last_affected":[],"package":"langchain-core","purl":"pkg:pypi/langchain-core","source":"GHSA-qh6h-p6c9-ff54"},{"ecosystem":"PyPI","fixed":["1.2.22"],"introduced":["0"],"last_affected":[],"package":"langchain-core","purl":"pkg:pypi/langchain-core","source":"PYSEC-2026-2193"}],"prev":{"headline":"nimiq-consensus panics via RequestMacroChain micro-block locator","id":"CVE-2026-34069"},"products":["langchain"],"published":"2026-03-31","related":[{"cvss_score":9.3,"headline":"LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs","id":"CVE-2025-68664","kev_date_added":null,"published":"2025-12-23"},{"cvss_score":5.3,"headline":"LangChain has incomplete f-string validation in prompt templates","id":"CVE-2026-40087","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":3.7,"headline":"LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages","id":"CVE-2026-26013","kev_date_added":null,"published":"2026-02-10"}],"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":"US public information, NVD API terms","name":"NVD"},{"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":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-08-25","vendors":["langchain-ai"]},"summary":"Attackers can read arbitrary files on the host filesystem by exploiting path traversal in LangChain Core's legacy prompt loading functions.","url":"https://insights.sbomify.com/CVE-2026-34070/"}