CVE-2026-41488
LOW 3.1CVSS 3.1langchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding
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.
- Published
- 24 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-918
- Also known as
- GHSA-r7w7-9xr2-qq2rPYSEC-2026-76
- Sources
- NVDJSONOSV GHSA-r7w7-9xr2-qq2rJSONOSV PYSEC-2026-76JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | LOW 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | langchain | langchain-openaicpe:2.3:a:langchain:langchain-openai:*:*:*:*:*:*:*:* |
< 1.1.14 | 1.1.14 |
| OSV | PyPI | langchain-openai | < 1.1.14 | 1.1.14 |
References
- https://github.com/langchain-ai/langchain/security/advisories/GHSA-r7w7-9xr2-qq2r · Mitigation, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-41488 · ADVISORY
- https://github.com/langchain-ai/langchain · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain-openai/PYSEC-2026-76.yaml · WEB
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 24 Apr 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 24 Apr 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 16 Apr 2026)