LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langchain-ai | langchain | before 1.2.11 | 1.2.11 | Patch available | CNA |
| — | langchain-core (PyPI) | before 1.2.11 | 1.2.11 | Patch available | GHSA-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
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* | before 1.2.11 | Vulnerable | langchain-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 →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Lightspeed | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-26013
- 2026-10-03 Alias added: GHSA-2g6r-c272-w58r
References
Advisory 2
More langchain-ai Langchain Core vulnerabilities
- 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
- CVE-2026-26013 · CVE Program
- CVE-2026-26013 · NVD
- FIRST EPSS
- GHSA-2g6r-c272-w58r · GitHub Advisory Database · CC BY 4.0
- CVE-2026-26013 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences