CVE-2026-26013 json
LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
published 2026-02-10 8 mo ago modified 2026-09-10 1 mo ago also EUVD-2026-6240 , GHSA-2g6r-c272-w58r , PYSEC-2026-2562
- cvss
- 3.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 36%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi langchain-core 1.2.11
- langchain langchain_core 1.2.11
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-26013 updated cvss 3.7
langchain: SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages
-
Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9 Red Hat Ansible Automation Platform 2 ansible-automation-platform-24/lightspeed-rhel8, ansible-automation-platform-25/lightspeed-rhel8, ansible-automation-platform-26/lightspeed-rhel9 Red Hat OpenShift AI (RHOAI) rhoai/odh-llama-stack-core-rhel9, rhoai/odh-trustyai-ragas-lls-provider-dsp-rhel9affected: workaround, no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 8 mo ago
Exploit prediction
0.42% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | langchain-core | <1.2.11 |
1.2.11 |
Affected products
- langchain-ai langchain
Classification
- Weakness
-
- CWE-918 Server-Side Request Forgery
References
-
github.com
/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565
web, patch
-
github.com
/langchain-ai/langchain/security/advisories/GHSA-2g6r-c272-w58r
web, mitigation, vendor-advisory
-
github.com
/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.11
web, product, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-26013
advisory
-
github.com
/langchain-ai/langchain
package
-
pypi.org
/project/langchain-core
package
-
github.com
/advisories/GHSA-2g6r-c272-w58r
advisory
Sources
- CVE List CVE-2026-26013
- GitHub Advisory GHSA-2g6r-c272-w58r
- NVD CVE-2026-26013
- OSV PYSEC-2026-2562
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.