Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit image URL with attacker-controlled domain
-
DeliveryDNS resolves to public IP, passes SSRF validation
-
ExploitAttacker flips DNS record to internal/private IP
-
ExecutionApplication issues independent fetch DNS resolution
-
Persisthttpx connects to internal host
-
ImpactTiming or error response reveals open port
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application accept attacker-controlled image URLs and route them through langchain-openai's |
| Impact | All available signals converge on a low-priority risk profile. The CVSS 3.1 base score of 3.1 (Low) is driven by AC:H - DNS rebinding demands attacker-controlled DNS infrastructure with sub-TTL timing precision - and C:L with I:N/A:N, reflecting that only blind inference is possible. EPSS at 0.03% (8th percentile) confirms the exploitation probability is negligible in the near term. SSVC rates exploitation as none, automatable as no, and technical impact as partial, meaning this does not meet the threshold for emergency remediation under standard prioritization frameworks. The vendor advisory explicitly caps the worst-case outcome at blind port probing based on timing or error behavior differences, since Pillow consumes the response internally without surfacing it. No conflicting signals are present: CVSS, EPSS, SSVC, and the absence from CISA KEV are mutually consistent. The primary mitigating factor is the response-body containment within Pillow - this is what prevents the classic SSRF data-exfiltration scenario and limits the vulnerability to a reconnaissance primitive against internal infrastructure. |
| Exploit ScenarioDerived | An attacker registers a domain and configures its DNS with a TTL of 0-1 seconds, initially pointing to a legitimate public IP so that |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
DNS rebinding in langchain-openai before 1.1.14 allows an attacker-controlled hostname to bypass SSRF protection in the image token-counting code path, enabling blind probing of internal network services. The _url_to_size() helper performs URL validation and the subsequent HTTP fetch as two independent operations with separate DNS resolution, creating a TOCTOU race window that a malicious domain with a short TTL can exploit to redirect the fetch to a private or localhost address after passing the initial check. Practical impact is bounded: the HTTP response is consumed only by Pillow for image dimension extraction and is never returned or logged, making data exfiltration impossible; SSVC confirms no active exploitation, EPSS sits at the 8th percentile, and no public exploit code exists at time of analysis.
RemediationAI
Upgrade langchain-openai to version 1.1.14 or later and simultaneously upgrade langchain-core to 1.2.31 or later, as the fix depends on SSRFSafeSyncTransport introduced in that langchain-core release. The full advisory with patch details is at https://github.com/langchain-ai/langchain/security/advisories/GHSA-r7w7-9xr2-qq2r. If immediate patching is not possible, apply egress firewall rules on the application server to block outbound HTTP/HTTPS to RFC-1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), the APIPA/link-local range (169.254.0.0/16 including the AWS/GCP metadata endpoint 169.254.169.254), and the IPv6 loopback/ULA ranges; note that this control operates at the network layer and does not fix the TOCTOU race itself, so a sufficiently creative attacker with DNS infrastructure in a routable but sensitive IP space could still probe those ranges. As a secondary control, avoid exposing get_num_tokens_from_messages to untrusted user-provided image URLs without sanitizing the URL to a known-good allowlist before it reaches langchain-openai.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is in libs/partners/openai/langchain_openai/chat_models/base.py within _url_to_size(), which is invoked by get_num_tokens_from_messages to measure image dimensions for token budget calculations. The root cause is CWE-918 (Server-Side Request Forgery) in its TOCTOU form: the function first calls validate_safe_url() to block private-range destinations, but then issues a completely independent httpx.get() call whose DNS resolution is separate from the validation step. An attacker who controls a domain sets a near-zero TTL and initially answers with a public IP to pass validation; before the second resolution occurs, the attacker flips the DNS record to a private RFC-1918 address, the cloud metadata endpoint 169.254.169.254, or a Kubernetes cluster-internal address. The affected CPE is cpe:2.3:a:langchain-ai:langchain-openai:*:*:*:*:*:*:*:* for all versions prior to 1.1.14. The fix (langchain-openai 1.1.14) replaces the validate-then-fetch pattern with SSRFSafeSyncTransport from langchain-core, which resolves DNS once, validates all returned IPs against a comprehensive policy, pins the TCP connection to that IP, and disables redirect following.
Know when Langchain Openai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
DNS rebinding demands attacker DNS infrastructure and precise timing (AC:H); response body is Pillow-internal only, so I:N and A:N; blind probing warrants C:L.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 4 pypi packages depend on langchain-openai (4 direct, 0 indirect)
Ecosystem-wide dependent count for version 1.1.14.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
EUVD-2026-25635
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB