{"id":"CVE-2026-34070","state":"PUBLISHED","title":"LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions","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.","publishedAt":"2026-03-31T02:01:49.320Z","updatedAt":"2026-08-25T12:05:55.349Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["langchain-ai langchain"],"affected":[{"vendor":"langchain-ai","product":"langchain","versions":[{"version":"< 1.2.22","status":"affected"}]}],"references":["https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54","https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c","https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22","https://access.redhat.com/security/cve/CVE-2026-34070","https://bugzilla.redhat.com/show_bug.cgi?id=2453287","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.json","https://access.redhat.com/errata/RHSA-2026:24766","https://access.redhat.com/errata/RHSA-2026:59159","https://access.redhat.com/errata/RHSA-2026:37275"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/34xxx/CVE-2026-34070.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-34070","state":"PUBLISHED","datePublished":"2026-03-31T02:01:49.320Z","dateUpdated":"2026-08-25T12:05:55.349Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-25T16:21:40.867Z"},"containers":{"cna":{"title":"LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"langchain-ai","product":"langchain","versions":[{"version":"< 1.2.22","status":"affected"}]}],"references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54","name":"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","name":"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","name":"https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-03-31T02:01:49.320Z"},"source":{"advisory":"GHSA-qh6h-p6c9-ff54","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-31T15:17:33.597003Z","id":"CVE-2026-34070","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-31T18:04:59.283Z"}},{"title":"langchain: path traversal in legacy load_prompt functions in langchain-core","descriptions":[{"lang":"en","value":"A flaw was found in LangChain. Multiple functions in `langchain_core.prompts.loading` read files from paths embedded in deserialized configuration dictionaries without validation for 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."}],"affected":[{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.5","packageName":"ansible-automation-platform-25/lightspeed-rhel8","defaultStatus":"affected","versions":[{"version":"1780082949","status":"unaffected","lessThan":"*","versionType":"rpm"},{"version":"1787229385","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:ansible_automation_platform:2.5::el8"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.3","packageName":"rhoai/odh-llama-stack-core-rhel9","defaultStatus":"affected","versions":[{"version":"1782471587","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:3.3::el9"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI 3.3","packageName":"rhoai/odh-trustyai-nemo-guardrails-server-rhel9","defaultStatus":"affected","versions":[{"version":"1782471606","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:openshift_ai:3.3::el9"]},{"vendor":"Red Hat","product":"OpenShift Lightspeed","packageName":"openshift-lightspeed/lightspeed-service-api-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_lightspeed"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","packageName":"ansible-automation-platform-25/lightspeed-chatbot-rhel8","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_automation_platform:2"]},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","packageName":"ansible-automation-platform-26/lightspeed-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:ansible_automation_platform:2"]},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","packageName":"rhoai/odh-mlflow-rhel9","defaultStatus":"unaffected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openshift_ai"]}],"references":[{"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","name":"RHBZ#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"]}],"metrics":[{"other":{"content":{"namespace":"https://access.redhat.com/security/updates/classification/","value":"Important"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","description":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat-SADP","orgId":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c","dateUpdated":"2026-08-25T12:05:55.349Z"},"datePublic":"2026-03-31T02:01:49.320Z","solutions":[{"lang":"en","value":"RHSA-2026:24766: Red Hat Ansible Automation Platform 2.5"},{"lang":"en","value":"RHSA-2026:59159: Red Hat Ansible Automation Platform 2.5"},{"lang":"en","value":"RHSA-2026:37275: Red Hat OpenShift AI 3.3"}],"timeline":[{"lang":"en","time":"2026-03-31T03:02:19.523Z","value":"Reported to Red Hat."},{"lang":"en","time":"2026-03-31T02:01:49.320Z","value":"Made public."}],"workarounds":[{"lang":"en","value":"As described in the statement section, the vulnerable methods are legacy APIs and their use should be avoided. To mitigate this issue, the dumpd, dumps, load and loads methods from langchain_core.load should be used, as they supersede the legacy API and provide a more secure serialization model."}],"x_adpType":"supplier","x_generator":{"engine":"sadp-cli 1.0.0"}}]}}}