Read the docs
TI-2026-21027 Aliases CVE-2026-26013GHSA-2g6r-c272-w58r

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

Priority LOW 18CWE-918Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
None · None · Low
Fix status
Partial Red Hat: 3 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00424 36th percentileScored 2026-11-07
Fix Partial langchain (langchain-ai): 1.2.11langchain-core (PyPI): 1.2.11Red Hat: 3 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
langchain-ailangchainbefore 1.2.111.2.11Patch availableCNA
—langchain-core (PyPI)before 1.2.111.2.11Patch availableGHSA-2g6r-c272-w58r
  • langchain Vendorlangchain-ai Affected before 1.2.11 Fixed in 1.2.11 Patch available CNA
  • langchain-core (PyPI) Vendor— Affected before 1.2.11 Fixed in 1.2.11 Patch available GHSA-2g6r-c272-w58r

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*before 1.2.11Vulnerablelangchain-ai
  • cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* Versions before 1.2.11 Vulnerable ·langchain-ai

Remediation

  • Fix · CNA langchain (langchain-ai) Fixed in 1.2.11
  • Fix · GHSA-2g6r-c272-w58r langchain-core (PyPI) Fixed in 1.2.11 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Low. Red Hat's page for this CVE →

ProductStatusPlan or fix
OpenShift LightspeedAffectedNo fix yet: Fix deferred
Red Hat Ansible Automation Platform 2AffectedNo fix yet: Fix deferred
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-26013
  2. 2026-10-03 Alias added: GHSA-2g6r-c272-w58r

References

  • TI-2025-42157 LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs CVSS 3.1CRITICAL 9.3
  • TI-2026-26395 LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions CVSS 3.1HIGH 7.5
  • TI-2026-28915 LangChain has incomplete f-string validation in prompt templates CVSS 3.1MEDIUM 5.3

Sources