{"id":"CVE-2026-26013","published":"2026-02-10T21:51:07Z","modified":"2026-02-11T21:26:34Z","title":"LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages","vendor":"langchain-ai","product":"langchain","tier":"tail","description":{"text":"LangChain is a framework for building agents and LLM-powered applications. Prior to 1.2.11, the ChatOpenAI.get_num_tokens_from_messages() method fetches arbitrary image_url values without validation when computing token counts for vision-enabled models. This allows attackers to trigger Server-Side Request Forgery (SSRF) attacks by providing malicious image URLs in user input. This vulnerability is fixed in 1.2.11.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00424,"percentile":0.37551,"provenance":"source"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-2g6r-c272-w58r","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.11","tags":["x_refsource_MISC"]}],"priority":{"score":10.1,"factors":[{"name":"EPSS percentile","points":7.51},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain","versions":["< 1.2.11"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-02-11T21:26:20.888102Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-core","vulnerableRanges":["<1.2.11"],"patched":["1.2.11"],"from":["GHSA-2g6r-c272-w58r","PYSEC-2026-2562"],"provenance":"source"}],"summary":{"text":"LangChain's ChatOpenAI.get_num_tokens_from_messages() method in the langchain product, prior to version 1.2.11, fetches arbitrary image_url values without validation when counting tokens for vision-enabled models, resulting in a server-side request forgery flaw. An attacker who can supply malicious image URLs in user input over the network, without authentication or user interaction, can cause the server to issue requests to destinations of their choosing, with the attack complexity noted as high.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:07:09Z"},"euvd":{"id":"EUVD-2026-6240","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-10940","published":"2025-03-20","fixed":"0.3.15","kev":false},{"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,"link":{"from":"CVE-2025-68664","to":"CVE-2026-26013","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"1.2.5","toFixed":"1.2.11","daysApart":49}]}},{"cve":"CVE-2026-26013","published":"2026-02-10","fixed":"1.2.11","kev":false},{"cve":"CVE-2026-34070","published":"2026-03-31","fixed":"1.2.22","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-40087","published":"2026-04-09","fixed":"1.2.28","kev":false},{"cve":"CVE-2026-44843","published":"2026-05-26","fixed":"1.3.3","kev":false}],"package":"PyPI:langchain-core"}}