{"id":"CVE-2026-34070","published":"2026-03-31T02:01:49Z","modified":"2026-08-25T12:05:55Z","title":"LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions","vendor":"langchain-ai","product":"langchain","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01468,"percentile":0.74354,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-34070","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2453287","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:24766","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:59159","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:37275","tags":["vendor-advisory","x_refsource_REDHAT"]}],"priority":{"score":25.1,"factors":[{"name":"EPSS percentile","points":14.87},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-03-26","earliestUrl":"https://github.com/Rickidevs/CVE-2026-34070","repos":[{"name":"Rickidevs/CVE-2026-34070","url":"https://github.com/Rickidevs/CVE-2026-34070","stars":0,"created":"2026-03-26"}]},"first":{"date":"2026-03-26","source":"PoC-in-GitHub","url":"https://github.com/Rickidevs/CVE-2026-34070"},"provenance":"source"},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain","versions":["< 1.2.22"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-03-31T15:17:33.597003Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-core","vulnerableRanges":["<1.2.22"],"patched":["1.2.22"],"from":["GHSA-qh6h-p6c9-ff54","PYSEC-2026-2193"],"provenance":"source"}],"summary":{"text":"The LangChain Core library (langchain_core.prompts.loading, in the langchain product) contains a path traversal flaw in its legacy load_prompt and load_prompt_from_config functions, which read files from paths embedded in deserialized configuration dictionaries without checking for directory traversal or absolute paths. An attacker who can influence prompt configurations passed to these functions over the network, without authentication or user interaction, can read arbitrary files on the host filesystem, limited only by file-extension checks (.txt for templates, .json or .yaml for examples).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T07:24:43Z"},"euvd":{"id":"EUVD-2026-17283","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-65106","published":"2025-11-21","fixed":"1.0.7","kev":false},{"cve":"CVE-2025-68664","published":"2025-12-23","fixed":"1.2.5","kev":false},{"cve":"CVE-2026-26013","published":"2026-02-10","fixed":"1.2.11","kev":false,"link":{"from":"CVE-2026-26013","to":"CVE-2026-34070","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"1.2.11","toFixed":"1.2.22","daysApart":49}]}},{"cve":"CVE-2026-34070","published":"2026-03-31","fixed":"1.2.22","kev":false},{"cve":"CVE-2026-40087","published":"2026-04-09","fixed":"1.2.28","kev":false,"link":{"from":"CVE-2026-34070","to":"CVE-2026-40087","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"1.2.22","toFixed":"1.2.28","daysApart":9}]}},{"cve":"CVE-2026-44843","published":"2026-05-26","fixed":"1.3.3","kev":false}],"package":"PyPI:langchain-core"}}