CVE-2026-26013 Details
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.
A Server-Side Request Forgery (SSRF) vulnerability has been identified in the LangChain framework, specifically within the ChatOpenAI.get_num_tokens_from_messages() method. This issue is present in versions of LangChain prior to 1.2.11. The vulnerability arises because the method processes image URLs from user input without proper validation, allowing attackers to send malicious URLs that the server will fetch. This could lead to unauthorized access of internal resources or external URLs.
Upgrade to LangChain version 1.2.11 or later, which includes the necessary SSRF protection. If an immediate upgrade is not possible, validate and sanitize image URLs before using them in the get_num_tokens_from_messages() method.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 11, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-918 | Server-Side Request Forgery (SSRF) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| langchain langchain core | < 1.2.11 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 17, 2026 | Initial Analysis | [email protected] |
| Feb 10, 2026 | New CVE Received | [email protected] |