CVE-2026-26013
LOW 3.7CVSS 3.1LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
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.
- Published
- 10 Feb 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-918
- Also known as
- GHSA-2g6r-c272-w58rPYSEC-2026-2562
- Sources
- NVDJSONOSV GHSA-2g6r-c272-w58rJSONOSV PYSEC-2026-2562JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | PyPA | CVSS 3.1 | LOW 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | langchain | langchain_corecpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* |
< 1.2.11 | 1.2.11 |
| OSV | PyPI | langchain-core | < 1.2.11 | 1.2.11 |
References
- https://github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565 · Patch, WEB
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.11 · Product, Release Notes, WEB
- https://github.com/langchain-ai/langchain/security/advisories/GHSA-2g6r-c272-w58r · Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-26013 · ADVISORY
- https://github.com/langchain-ai/langchain · PACKAGE
- https://pypi.org/project/langchain-core · PACKAGE
- https://github.com/advisories/GHSA-2g6r-c272-w58r · ADVISORY
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 10 Feb 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 11 Feb 2026)