Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain-core
  4. ›
  5. CVE-2026-26013

CVE-2026-26013: LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages

February 11, 2026

The ChatOpenAI.get_num_tokens_from_messages() method fetches arbitrary image_url values without validation when computing token counts for vision-enabled models. This allows attackers to trigger Server-Side Request Forgery (SSRF) attacks by providing malicious image URLs in user input.

References

  • github.com/advisories/GHSA-2g6r-c272-w58r
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565
  • github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.11
  • github.com/langchain-ai/langchain/security/advisories/GHSA-2g6r-c272-w58r
  • nvd.nist.gov/vuln/detail/CVE-2026-26013

Code Behaviors & Features

Detect and mitigate CVE-2026-26013 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.2.11

Fixed versions

  • 1.2.11

Solution

Upgrade to version 1.2.11 or above.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

pypi/langchain-core/CVE-2026-26013.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 25 Mar 2026 00:17:26 +0000.