The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-26013

CVE-2026-26013: LangChain SSRF Vulnerability

CVE-2026-26013 is a server-side request forgery flaw in LangChain that allows attackers to trigger SSRF attacks via malicious image URLs. This article covers the technical details, affected versions, and mitigation steps.

Published: February 13, 2026

CVE-2026-26013 Overview

CVE-2026-26013 is a Server-Side Request Forgery (SSRF) vulnerability in LangChain, a popular framework for building agents and LLM-powered applications. Prior to version 1.2.11, 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 SSRF attacks by providing malicious image URLs in user input, potentially enabling unauthorized access to internal network resources.

Critical Impact

Attackers can exploit unvalidated image URL processing to perform SSRF attacks, potentially accessing internal services, cloud metadata endpoints, or sensitive network resources from the server-side context.

Affected Products

  • LangChain versions prior to 1.2.11
  • LangChain applications using vision-enabled OpenAI models
  • Systems utilizing ChatOpenAI.get_num_tokens_from_messages() with user-controlled image inputs

Discovery Timeline

  • 2026-02-10 - CVE-2026-26013 published to NVD
  • 2026-02-11 - Last updated in NVD database

Technical Details for CVE-2026-26013

Vulnerability Analysis

This vulnerability exists within the token counting functionality of LangChain's ChatOpenAI integration. When processing messages that contain image content for vision-enabled models (such as GPT-4 Vision), the get_num_tokens_from_messages() method directly fetches image URLs provided in the message payload without performing any validation or sanitization.

The vulnerability is classified under CWE-918 (Server-Side Request Forgery), indicating that the application can be manipulated into making HTTP requests to arbitrary destinations controlled by the attacker. This is particularly concerning in LangChain deployments where user input is processed through the token counting mechanism.

Root Cause

The root cause lies in the lack of URL validation before fetching external resources. The get_num_tokens_from_messages() function accepts image URLs as part of the message content structure and attempts to retrieve them to accurately calculate token usage. Without proper validation, any URL—including those pointing to internal network addresses, localhost services, or cloud provider metadata endpoints—can be accessed by the server.

Attack Vector

The attack vector is network-based and can be exploited remotely. An attacker can craft malicious input containing specially crafted image_url values targeting internal resources. When LangChain processes this input through the vulnerable token counting method, the server will make requests to the attacker-specified URLs.

Typical SSRF exploitation scenarios include:

  • Accessing cloud metadata services (e.g., http://169.254.169.254/latest/meta-data/)
  • Probing internal network services and infrastructure
  • Bypassing firewall restrictions by making requests from the trusted server context
  • Exfiltrating sensitive data from internal endpoints

For detailed technical information about this vulnerability, see the GitHub Security Advisory and the security patch commit.

Detection Methods for CVE-2026-26013

Indicators of Compromise

  • Unusual outbound HTTP requests from LangChain application servers to internal IP ranges (e.g., 10.x.x.x, 172.16.x.x, 192.168.x.x)
  • Requests to cloud metadata endpoints such as 169.254.169.254 from application servers
  • Unexpected network connections originating from the LangChain service to non-standard ports
  • Log entries showing image URL processing with internal or suspicious destination addresses

Detection Strategies

  • Monitor network traffic from LangChain application servers for connections to internal IP ranges that should not be accessed
  • Implement web application firewall (WAF) rules to detect SSRF payloads in image URL parameters
  • Enable verbose logging for the ChatOpenAI class to capture all image URLs being processed
  • Deploy network segmentation monitoring to detect lateral movement attempts via SSRF

Monitoring Recommendations

  • Configure alerting on outbound requests from application servers to RFC 1918 private address spaces
  • Monitor for DNS resolution requests to internal hostnames from the LangChain service
  • Implement request logging at the network egress point to capture all outbound HTTP connections
  • Review application logs for error messages related to failed internal resource access attempts

How to Mitigate CVE-2026-26013

Immediate Actions Required

  • Upgrade LangChain to version 1.2.11 or later immediately
  • Audit existing LangChain deployments for usage of ChatOpenAI.get_num_tokens_from_messages() with user-controlled input
  • Implement network-level controls to restrict outbound connections from LangChain application servers
  • Review logs for any evidence of prior exploitation attempts

Patch Information

The vulnerability has been fixed in LangChain version 1.2.11. The security patch introduces proper URL validation to prevent SSRF attacks through the token counting mechanism. Organizations should upgrade to this version or later to remediate the vulnerability.

  • GitHub Release Tag for version 1.2.11
  • Security Patch Commit

Workarounds

  • Implement input validation to sanitize and validate all image URLs before passing them to LangChain functions
  • Deploy network egress filtering to block requests to internal IP ranges and sensitive endpoints from the application server
  • Use an allowlist approach for image URL domains if possible, restricting to known trusted sources
  • Consider proxying image requests through a dedicated service with strict URL validation
bash
# Example network-level mitigation using iptables to block internal network access
# Block access to common internal ranges from the application server
iptables -A OUTPUT -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -d 192.168.0.0/16 -j DROP
iptables -A OUTPUT -d 169.254.169.254 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechLangchain

  • SeverityLOW

  • CVSS Score3.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-918
  • Technical References
  • GitHub Commit Update

  • GitHub Release Tag

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-27795: LangChain RecursiveUrlLoader SSRF Bypass

  • CVE-2026-26019: LangChain RecursiveUrlLoader SSRF Vulnerability

  • CVE-2025-2828: Langchain RequestsToolkit SSRF Vulnerability

  • CVE-2026-34070: LangChain Path Traversal Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English