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
- released April 16, 2026, on the day of disclosure
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 · 28 tracked dependents
Related items
- HighCVE-2026-137463: HKUDS nanobot OpenAI Codex provider skips TLS certificate checks on retrySame vendor · NVD/CVE Database
- HighCVE-2026-136537: LiteLLM key_management_endpoints missing authorization allows bypassSame vendor · NVD/CVE Database
- MediumCVE-2026-135287: LiteLLM Proxy callback injection through request body callbacks fieldsSame vendor · NVD/CVE Database
- MediumCVE-2026-132122: agentic-radar untrusted .env loading leaks OpenAI API key via scan commandSame vendor · NVD/CVE Database
- MediumCVE-2026-130358: AdminNeo before 5.9.1 contains a missing authentication vulnerability in the ClaudeSqlPlugin, GeminiSqlPlugin, and…Same vendor · NVD/CVE Database