# CVE-2026-41488: angchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding

- Priority: **Routine**
- Reason: Not severe (CVSS 3.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-04-24 · Modified: 2026-04-27
- Aliases: GHSA-r7w7-9xr2-qq2r, PYSEC-2026-76
- Record: https://cvemate.com/vulnerability/CVE-2026-41488 · JSON: https://cvemate.com/vulnerability/CVE-2026-41488/json

## Description

```text
LangChain is a framework for building agents and LLM-powered applications. Prior to 1.1.14, langchain-openai's _url_to_size() helper (used by get_num_tokens_from_messages for image token counting) validated URLs for SSRF protection and then fetched them in a separate network operation with independent DNS resolution. This left a TOCTOU / DNS rebinding window: an attacker-controlled hostname could resolve to a public IP during validation and then to a private/localhost IP during the actual fetch.
```

## Signals

- CVSS: 3.1 low (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
- EPSS: 0.164%, percentile 5.776%, 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

- langchain-ai langchain-openai: \< 1.1.14
- langchain langchain-openai: \< 1.1.14
- PyPI langchain-openai (PyPI): \< 1.1.14

## References

- <https://github.com/langchain-ai/langchain/security/advisories/GHSA-r7w7-9xr2-qq2r>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-41488>
- <https://github.com/langchain-ai/langchain>
- <https://github.com/pypa/advisory-database/tree/main/vulns/langchain-openai/PYSEC-2026-76.yaml>

---

Data as of 2026-12-05T12:40:04.845Z. 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
