CVE-2026-26013
published low CVSS 3.1 · 3.7LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| langchain-ai | — | langchain< 1.2.11 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 3.7 / 10
- Severity
- low
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchain | < 1.2.11 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-918 CWE-918: Server-Side Request Forgery (SSRF)
References
3Provider assertions
2GitHub_M · cna
LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c1407d27eaaaa006566c141f6933af50da0091c9f0910ee640ffe75e677a4a72
- Ingested
- 23 Sep 2026, 09:07:08 UTC
- Source record
- Official CVE record