CVE-2026-26013
Awaiting Analysis Awaiting Analysis - Queue
SSRF Vulnerability in LangChain ChatOpenAI Image URL Processing

Publication date: 2026-02-10

Last updated on: 2026-03-17

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-10
Last Modified
2026-03-17
Generated
2026-05-07
AI Q&A
2026-02-11
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
langchain langchain_core to 1.2.11 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-918 The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The vulnerability exists in LangChain versions prior to 1.2.11 in the ChatOpenAI.get_num_tokens_from_messages() method. This method fetches image URLs without validating them when calculating token counts for vision-enabled models. Because of this lack of validation, attackers can supply malicious image URLs in user input to trigger Server-Side Request Forgery (SSRF) attacks.


How can this vulnerability impact me? :

This vulnerability can allow attackers to perform SSRF attacks by making the server fetch arbitrary URLs. SSRF attacks can lead to unauthorized access to internal systems, exposure of sensitive information, or interaction with internal services that are not normally accessible from outside the network.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

I don't know


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, upgrade LangChain to version 1.2.11 or later where the issue is fixed.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart