Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2024-2057

CVE-2024-2057: Langchain Langchain SSRF Vulnerability

CVE-2024-2057 is a critical server-side request forgery flaw in Langchain Langchain affecting TFIDFRetriever. This vulnerability allows remote attackers to exploit SSRF weaknesses. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: April 15, 2026

CVE-2024-2057 Overview

A critical Server-Side Request Forgery (SSRF) vulnerability has been identified in LangChain's langchain_community package version 0.0.26. The vulnerability exists in the load_local function within the TFIDFRetriever component, allowing remote attackers to manipulate server-side requests without authentication. This flaw enables attackers to potentially access internal resources, exfiltrate sensitive data, or pivot to other systems within the network.

Critical Impact

Remote attackers can exploit the SSRF vulnerability in LangChain's TFIDFRetriever to forge server-side requests, potentially accessing internal services, cloud metadata endpoints, and sensitive infrastructure not intended for public access.

Affected Products

  • LangChain langchain_community version 0.0.26
  • Applications utilizing the TFIDFRetriever component with load_local function
  • Systems running unpatched LangChain community libraries

Discovery Timeline

  • 2024-03-01 - CVE-2024-2057 published to NVD
  • 2025-03-04 - Last updated in NVD database

Technical Details for CVE-2024-2057

Vulnerability Analysis

The vulnerability resides in the load_local function within libs/community/langchain_community/retrievers/tfidf.py. This function is part of the TFIDFRetriever component, which is designed to load and process local TF-IDF (Term Frequency-Inverse Document Frequency) models for document retrieval operations.

The core issue stems from insufficient validation of input parameters when loading local resources. The function fails to properly sanitize or restrict the file paths and URLs that can be processed, creating an opportunity for attackers to craft malicious inputs that cause the server to make unintended requests to arbitrary destinations.

Due to the network-accessible nature of this vulnerability and the lack of authentication requirements, attackers can exploit this flaw remotely with minimal complexity. Successful exploitation could result in unauthorized access to internal services, cloud provider metadata endpoints (such as AWS IMDSv1), or other sensitive infrastructure components that should not be externally accessible.

Root Cause

The root cause is improper input validation in the load_local function of the TFIDFRetriever class (CWE-918: Server-Side Request Forgery). The function does not adequately validate or sanitize user-supplied input before using it to construct server-side requests. This allows attackers to inject malicious URLs or file paths that redirect the server's requests to unintended targets, bypassing network security controls and accessing resources that should be protected.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability remotely by providing specially crafted input to the load_local function. The manipulation causes the server to make requests on behalf of the attacker, potentially targeting:

  • Internal network services not exposed to the internet
  • Cloud metadata services (AWS, GCP, Azure metadata endpoints)
  • Local file system resources
  • Other backend services accessible from the vulnerable server

The exploit has been publicly disclosed and a proof-of-concept file (PoC.pkl) is available, increasing the risk of exploitation in the wild.

Detection Methods for CVE-2024-2057

Indicators of Compromise

  • Unusual outbound requests from servers running LangChain applications to internal IP ranges (e.g., 169.254.169.254, 10.x.x.x, 192.168.x.x)
  • Log entries showing the TFIDFRetriever load_local function being called with external URLs or unexpected file paths
  • Anomalous network traffic patterns from application servers to cloud metadata endpoints
  • Pickle file artifacts with suspicious serialized payloads in application directories

Detection Strategies

  • Monitor network traffic for SSRF patterns including requests to cloud metadata services and internal network ranges
  • Implement application logging to capture all inputs to the load_local function in TFIDFRetriever
  • Deploy web application firewalls (WAF) with SSRF detection rules to block malicious request patterns
  • Use SentinelOne's runtime protection to detect anomalous process behavior and unauthorized network connections

Monitoring Recommendations

  • Enable verbose logging for LangChain applications, particularly around retriever operations
  • Set up alerts for outbound connections to RFC 1918 private address ranges from public-facing applications
  • Monitor for access attempts to sensitive internal endpoints such as cloud provider metadata services
  • Regularly audit dependencies and ensure langchain_community is updated to version 0.0.27 or later

How to Mitigate CVE-2024-2057

Immediate Actions Required

  • Upgrade langchain_community to version 0.0.27 or later immediately
  • Audit all applications using TFIDFRetriever to identify potential exposure
  • Implement network segmentation to limit the impact of potential SSRF attacks
  • Review application logs for signs of exploitation attempts
  • Block outbound requests to cloud metadata endpoints from application servers where not required

Patch Information

LangChain has addressed this vulnerability in version 0.0.27 of the langchain_community package. The fix was implemented via GitHub Pull Request #18695. Organizations should upgrade to the patched version as soon as possible. The vulnerability is tracked in VulDB as VDB-255372.

Workarounds

  • Implement strict input validation on any user-supplied data before passing it to TFIDFRetriever functions
  • Use network-level controls to restrict outbound connections from application servers to only necessary destinations
  • Deploy an egress firewall to block requests to internal network ranges and cloud metadata endpoints
  • Consider disabling the TFIDFRetriever component if not actively used until patching is complete
bash
# Upgrade langchain_community to patched version
pip install --upgrade langchain_community>=0.0.27

# Verify installed version
pip show langchain_community | grep Version

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechLangchain

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-918
  • Technical References
  • GitHub CVE-2016 Vulnerability

  • GitHub PoC File

  • VulDB CTI #255372

  • VulDB #255372
  • Vendor Resources
  • GitHub Pull Request Discussion
  • Related CVEs
  • CVE-2026-27795: LangChain RecursiveUrlLoader SSRF Bypass

  • CVE-2026-26019: LangChain RecursiveUrlLoader SSRF Vulnerability

  • CVE-2026-26013: LangChain SSRF Vulnerability

  • CVE-2025-2828: Langchain RequestsToolkit SSRF Vulnerability
Default Legacy - Prefooter | 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