{"schemaVersion":3,"id":"CVE-2025-65106","aliases":["GHSA-6qv9-48xg-fc7f","PYSEC-2026-1518","CGA-2g3h-j5p4-hmq5","CGA-4x9w-62m7-gg6c","CGA-67j5-q64c-rxrh","CGA-xxwf-h5gx-4pgc"],"status":"published","duplicateOf":null,"title":null,"description":"LangChain is a framework for building agents and LLM-powered applications. From versions 0.3.79 and prior and 1.0.0 to 1.0.6, a template injection vulnerability exists in LangChain's prompt template system that allows attackers to access Python object internals through template syntax. This vulnerability affects applications that accept untrusted template strings (not just template variables) in ChatPromptTemplate and related prompt template classes. This issue has been patched in versions 0.3.80 and 1.0.7.","dates":{"published":"2025-11-21T21:43:02.461Z","modified":"2025-11-21T21:53:19.566Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.3,"severity":"high","version":"4.0","versionLabel":"v4.0","source":"CVE.org","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":8.3,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":8.3,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Wolfi","score":8.3,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Chainguard","score":8.3,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":8.3,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00505,"percentile":0.41912,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":-0.0040000000000000105,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00509},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00505,"percentile":0.41912}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00509,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00505,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00505,"percentile":0.41912}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine","description":"The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/1336.html"}],"affected":[{"vendor":"chainguard","product":"open-webui","name":"open-webui","label":"open-webui","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/open-webui","purlType":"apk","versions":[{"text":"< 0.6.37-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.6.37-r0","eol":null,"hubHref":null},{"vendor":"chainguard","product":"open-webui-compat","name":"open-webui-compat","label":"open-webui-compat","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/open-webui-compat","purlType":"apk","versions":[{"text":"< 0.6.37-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.6.37-r0","eol":null,"hubHref":null},{"vendor":"wolfi","product":"open-webui","name":"open-webui","label":"open-webui","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/open-webui","purlType":"apk","versions":[{"text":"< 0.6.37-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.6.37-r0","eol":null,"hubHref":null},{"vendor":"wolfi","product":"open-webui-compat","name":"open-webui-compat","label":"open-webui-compat","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/open-webui-compat","purlType":"apk","versions":[{"text":"< 0.6.37-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.6.37-r0","eol":null,"hubHref":null},{"vendor":"langchain-ai","product":"langchain","name":"langchain","label":"langchain","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.0.0, < 1.0.7","noFixRecorded":false,"fixedIn":null},{"text":"< 0.3.80","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.0, < 1.0.7 | < 0.3.80","eol":null,"hubHref":"/vendor/langchain-ai/langchain"},{"vendor":"PyPI","product":"langchain-core","name":"langchain-core","label":"langchain-core","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain-core","purlType":"pypi","versions":[{"text":"< 0.3.80","noFixRecorded":false,"fixedIn":null},{"text":"≥ 1.0.0, < 1.0.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.3.80 | ≥ 1.0.0, < 1.0.7","eol":null,"hubHref":null}],"affectedCount":6,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f","label":"github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory"]},{"url":"https://github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a","label":"github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX"]},{"url":"https://github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00","label":"github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-65106","label":"nvd.nist.gov/vuln/detail/CVE-2025-65106","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/langchain-ai/langchain","label":"github.com/langchain-ai/langchain","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pypi.org/project/langchain-core","label":"pypi.org/project/langchain-core","hostname":"pypi.org","tags":["PACKAGE"]},{"url":"https://github.com/advisories/GHSA-6qv9-48xg-fc7f","label":"github.com/advisories/GHSA-6qv9-48xg-fc7f","hostname":"github.com","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65106.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65106.json","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-PMP9-C8RV-94C8"]},"timeline":[{"kind":"published","date":"2025-11-21T21:43:02.461Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-11-21T21:53:19.566Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":33,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T05:36:14.246Z","stale":false,"partial":false}}