CVE-2026-26013

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

Published Feb 10, 2026 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2g6r-c272-w58r LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
History
Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain Core
CPEs cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*
Vendors & Products Langchain
Langchain langchain Core
Type Values Removed Values Added
First Time appeared Langchain-ai
Langchain-ai langchain
Vendors & Products Langchain-ai
Langchain-ai langchain
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
Weaknesses CWE-918
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 11, 2026, 9:26 PM
Reserved
Feb 9, 2026, 9:36 PM
Status
Analyzed
Published
Feb 10, 2026, 10:17 PM
Modified
Jun 17, 2026, 10:25 AM
Severity
Low
Public date
Feb 10, 2026, 9:51 PM