Vulnerability
CVE-2026-26013
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.
14 advisories report this vulnerability, across 3 ecosystems.
Advisories
- CGA-539c-4jf4-xg5h
- CGA-5gpq-qhc3-w96r
- CGA-7v3m-v487-3p9q
- CGA-8gfw-c59j-7hqh
- CGA-8v29-222x-wgvv
- CGA-f34m-ghc4-3vv7
- CGA-fhx9-fmqr-hmxj
- CGA-ggqh-262p-phqm
- CGA-hcf6-w7pw-x37p
- CGA-hx3c-hxww-8288
- CGA-phmr-8wp7-23w7
- CGA-wj66-h5pc-p4hh
-
GHSA-2g6r-c272-w58r
LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
-
PYSEC-2026-2562
LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages