Skip to content
LowVulnerabilityLLM-specific

CVE-2026-41488: LangChain OpenAI SSRF bypass via DNS rebinding in image token counting

Identifier
CVE-2026-41488
Published
Record updated
View JSON
Affected
  • langchain-openai < 1.1.14
Fixed in
1.1.14
  • released April 16, 2026, 8 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.2%

Summary

LangChain versions prior to 1.1.14 contain a flaw in the langchain-openai package's _url_to_size() helper, which get_num_tokens_from_messages uses for image token counting. The helper validates a URL against SSRF protections, then fetches it in a separate network operation with independent DNS resolution. An attacker-controlled hostname can resolve to a public IP during validation and to a private or localhost IP during the fetch, a TOCTOU / DNS rebinding window.

Mitigation

Fixed in 1.1.14.