Skip to main content
← All vulnerabilities
CVE-2026-26013PYSEC-2026-2562GHSA-2G6R-C272-W58R

LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.2.11
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • langchain-ai langchain

    fixed in 1.2.11

  • langchain-corePyPI

    fixed in 1.2.11

References 3

GitHub · langchain-ai/langchain