CVE-2026-26013
SSRF Vulnerability in LangChain ChatOpenAI Image URL Processing
Publication date: 2026-02-10
Last updated on: 2026-03-17
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| langchain | langchain_core | to 1.2.11 (exc) |
Helpful Resources
Exploitability
| 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.