GHSA-r7w7-9xr2-qq2r: langchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding
- Identifier
- GHSA-r7w7-9xr2-qq2r
- Published
- Record updated
- Affected
- langchain-openai < 1.1.14
- Fixed in
- 1.1.14
Summary
langchain-openai versions before 1.1.14 validated image URLs for SSRF protection in `_url_to_size()`, then fetched them with a separate DNS resolution, leaving a DNS rebinding window where a hostname could resolve to a public IP during validation and a private or localhost IP during the fetch. The fetched body is passed only to Pillow's `Image.open()` and never returned or logged, so an attacker cannot exfiltrate data, though blind probing of internal hosts and ports may be possible.
Mitigation
Fixed in langchain-openai 1.1.14 (requires langchain-core >= 1.2.31). The fix replaces validate-then-fetch with `SSRFSafeSyncTransport` from langchain-core, which resolves DNS once, validates returned IPs against a policy, pins the connection to the validated IP, and disables redirect following.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- langchain-openaiPyPILLM dependency since 2024-01-05 · 29 tracked dependents
Related items
- MediumCVE-2026-109296: Open WebUI missing authorization lets users reach disabled model backendsSame vendor · NVD/CVE Database
- MediumCVE-2026-107430: VideoWhisper Site Manager for ChatGPT, Claude, Codex missing authorization checkSame vendor · NVD/CVE Database
- MediumCVE-2026-108575: BerriAI LiteLLM improper authorization in secret resolution via api_keySame vendor · NVD/CVE Database
- HighCVE-2026-106119: LangChain MongoDBChatMessageHistory query injection via session identifierSame vendor · NVD/CVE Database
- LowGHSA-5x6v-p487-7qh2: LangChain: RediSearch Filter Injection via Unescaped Tag/Text ValuesSame vendor · GitHub Advisory Database