Server-side Request Forgery (SSRF) Affecting langchain-openai package, versions [,1.1.9)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.38% (30th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-LANGCHAINOPENAI-15263095
  • published11 Feb 2026
  • disclosed10 Feb 2026
  • creditFinder16

Introduced: 10 Feb 2026

CVE-2026-26013  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade langchain-openai to version 1.1.9 or higher.

Overview

langchain-openai is an An integration package connecting OpenAI and LangChain

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the ChatOpenAI.get_num_tokens_from_messages() function. An attacker can cause the server to make internal network requests, though they cannot see the responses, by supplying crafted image_url values in user input. The vulnerable invocation of get_num_tokens_from_messages() happens during token counting, which may happen at several points in the application's execution that are out of the control of the attacker. Small disruptions may result from exploitation, due to unintended requests being sent.

CVSS Base Scores

version 4.0
version 3.1