Low severityNVD Advisory· Published Feb 10, 2026· Updated Feb 11, 2026
LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
CVE-2026-26013
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
langchain-corePyPI | < 1.2.11 | 1.2.11 |
Affected products
12- osv-coords11 versionspkg:apk/chainguard/open-webuipkg:apk/chainguard/py3.10-langchainpkg:apk/chainguard/py3.12-langchainpkg:apk/chainguard/py3.13-langchainpkg:apk/chainguard/py3-langchainpkg:apk/wolfi/open-webuipkg:apk/wolfi/py3.10-langchainpkg:apk/wolfi/py3.12-langchainpkg:apk/wolfi/py3.13-langchainpkg:apk/wolfi/py3-langchainpkg:pypi/langchain-core
< 0.8.3-r0+ 10 more
- (no CPE)range: < 0.8.3-r0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0.8.3-r0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 1.2.11
- Range: < 1.2.11
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-2g6r-c272-w58rghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-26013ghsaADVISORY
- github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565ghsax_refsource_MISCWEB
- github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.11ghsax_refsource_MISCWEB
- github.com/langchain-ai/langchain/security/advisories/GHSA-2g6r-c272-w58rghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.