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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-918"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/26xxx/CVE-2026-26013.json"
}{
"extracted_events": [
{
"cpe": "cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.2.11"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "2b4b1dc29a833d4053deba4c2b77a3848c834565"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "langchain-core==1.2.11",
"range": [
{
"fixed": "057c484ba26a7d64e92876494cbc9708176d8baf"
}
],
"source": "REFERENCES_TAG"
}
]
}