# CVE-2026-26013: LangChain affected by SSRF via image\_url token counting in ChatOpenAI.get\_num\_tokens\_from\_messages

- Priority: **Routine**
- Reason: Not severe (CVSS 3.7, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-02-10 · Modified: 2026-02-11
- Aliases: GHSA-2g6r-c272-w58r, PYSEC-2026-2562, CGA-8gfw-c59j-7hqh, CGA-phmr-8wp7-23w7, CGA-539c-4jf4-xg5h, CGA-5gpq-qhc3-w96r, CGA-7v3m-v487-3p9q, CGA-8v29-222x-wgvv, CGA-f34m-ghc4-3vv7, CGA-fhx9-fmqr-hmxj, CGA-ggqh-262p-phqm, CGA-hcf6-w7pw-x37p, CGA-hx3c-hxww-8288, CGA-wj66-h5pc-p4hh
- Record: https://cvemate.com/vulnerability/CVE-2026-26013 · JSON: https://cvemate.com/vulnerability/CVE-2026-26013/json

## Description

```text
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.
```

## Signals

- CVSS: 3.7 low (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- EPSS: 0.424%, percentile 38.617%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard open-webui (Chainguard): \< 0.8.3-r0
- chainguard py3-langchain (Chainguard): All versions (No fix recorded)
- chainguard py3.10-langchain (Chainguard): All versions (No fix recorded)
- chainguard py3.11-langchain (Chainguard): All versions (No fix recorded)
- chainguard py3.12-langchain (Chainguard): All versions (No fix recorded)
- chainguard py3.13-langchain (Chainguard): All versions (No fix recorded)
- wolfi open-webui (Wolfi): \< 0.8.3-r0
- langchain-ai langchain: \< 1.2.11
- langchain langchain\_core: \< 1.2.11
- PyPI langchain-core (PyPI): \< 1.2.11

## References

- <https://github.com/langchain-ai/langchain/security/advisories/GHSA-2g6r-c272-w58r>
- <https://github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565>
- <https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.11>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-26013>
- <https://github.com/langchain-ai/langchain>
- <https://pypi.org/project/langchain-core>
- <https://github.com/advisories/GHSA-2g6r-c272-w58r>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/26xxx/CVE-2026-26013.json>

---

Data as of 2026-12-05T12:43:11.902Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
