CVE-2026-41488

angchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding

Published Apr 24, 2026 CVSS 3.1 · 3.1 Low EPSS < 1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-r7w7-9xr2-qq2r langchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding
History
Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain-openai
CPEs cpe:2.3:a:langchain:langchain-openai:*:*:*:*:*:*:*:*
Vendors & Products Langchain
Langchain langchain-openai
Type Values Removed Values Added
First Time appeared Langchain-ai
Langchain-ai langchain
Vendors & Products Langchain-ai
Langchain-ai langchain
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title angchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding
Weaknesses CWE-918
References
Metrics cvssV3_1

{'score': 3.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 27, 2026, 1:40 PM
Reserved
Apr 20, 2026, 4:14 PM
Status
Analyzed
Published
Apr 24, 2026, 9:16 PM
Modified
Oct 26, 2026, 9:10 PM
Severity
Low
Public date
Apr 24, 2026, 8:57 PM