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-2025-2828

CVE-2025-2828: Langchain RequestsToolkit SSRF Vulnerability

CVE-2025-2828 is a Server-Side Request Forgery flaw in Langchain's RequestsToolkit that enables attackers to scan ports, access local services, and retrieve cloud metadata. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: April 1, 2026

CVE-2025-2828 Overview

A Server-Side Request Forgery (SSRF) vulnerability has been identified in the RequestsToolkit component of the langchain-community package. Specifically, the vulnerability exists in langchain_community.agent_toolkits.openapi.toolkit.RequestsToolkit in langchain-ai/langchain version 0.0.27. This security flaw occurs because the toolkit does not enforce restrictions on requests to remote internet addresses, allowing it to also access local addresses. As a result, an attacker could exploit this vulnerability to perform port scans, access local services, retrieve instance metadata from cloud environments (e.g., Azure, AWS), and interact with servers on the local network.

Critical Impact

This SSRF vulnerability enables attackers to bypass network segmentation and access internal resources, potentially leading to credential theft from cloud metadata services, internal network reconnaissance, and unauthorized access to sensitive backend systems.

Affected Products

  • langchain-community package (langchain_community.agent_toolkits.openapi.toolkit.RequestsToolkit)
  • langchain-ai/langchain version 0.0.27
  • All deployments using RequestsToolkit without the allow_dangerous_requests parameter

Discovery Timeline

  • 2025-06-23 - CVE CVE-2025-2828 published to NVD
  • 2025-07-16 - Last updated in NVD database

Technical Details for CVE-2025-2828

Vulnerability Analysis

The SSRF vulnerability in LangChain's RequestsToolkit stems from insufficient validation of target URLs before making HTTP requests. When an AI agent utilizes the RequestsToolkit to interact with OpenAPI endpoints, the toolkit processes URLs without verifying whether they point to external resources or internal/local addresses. This architectural oversight allows malicious actors to craft requests that target internal infrastructure, cloud metadata endpoints (such as http://169.254.169.254/ for AWS or Azure), or localhost services that should not be externally accessible.

The vulnerability is particularly dangerous in AI agent deployments where user input may influence the URLs being requested. Since LangChain agents are often designed to dynamically interact with APIs based on user queries, an attacker could manipulate the agent into making requests to arbitrary endpoints, effectively using the application server as a proxy to access restricted resources.

Root Cause

The root cause of CVE-2025-2828 is the lack of URL validation and request restrictions in the RequestsToolkit class. The toolkit's request methods (RequestsGetTool, RequestsPostTool, RequestsPatchTool, RequestsPutTool, RequestsDeleteTool) did not implement any safeguards to prevent requests to internal network addresses, localhost, or cloud metadata services. This design assumed that all requests would be made to trusted external APIs, without accounting for scenarios where user input could direct requests to malicious destinations.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Crafting input that causes the LangChain agent to make requests to internal IP addresses (e.g., 127.0.0.1, 10.x.x.x, 192.168.x.x)
  2. Targeting cloud metadata endpoints to steal instance credentials and configuration data
  3. Performing port scanning on internal networks to discover available services
  4. Accessing internal APIs or services that are not exposed to the public internet
  5. Potentially pivoting to other attacks once internal network topology is mapped
python
# Security patch in libs/community/langchain_community/tools/requests/tool.py
# Source: https://github.com/langchain-ai/langchain/commit/e188d4ecb085d4561a0be3c583d26aa9c2c3283f

    requests_wrapper: GenericRequestsWrapper

+    allow_dangerous_requests: bool = False
+
+    def __init__(self, **kwargs: Any):
+        """Initialize the tool."""
+        if not kwargs.get("allow_dangerous_requests", False):
+            raise ValueError(
+                "You must set allow_dangerous_requests to True to use this tool. "
+                "Request scan be dangerous and can lead to security vulnerabilities. "
+                "For example, users can ask a server to make a request to an internal"
+                "server. It's recommended to use requests through a proxy server "
+                "and avoid accepting inputs from untrusted sources without proper "
+                "sandboxing."
+                "Please see: https://python.langchain.com/docs/security for "
+                "further security information."
+            )
+        super().__init__(**kwargs)


class RequestsGetTool(BaseRequestsTool, BaseTool):
    """Tool for making a GET request to an API endpoint."""

Source: LangChain GitHub Commit

Detection Methods for CVE-2025-2828

Indicators of Compromise

  • Outbound HTTP/HTTPS requests from application servers to internal IP ranges (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
  • Requests to cloud metadata endpoints such as 169.254.169.254 or metadata.google.internal
  • Unusual patterns of sequential port connections indicating reconnaissance activity
  • Application logs showing requests to unexpected localhost services or internal hostnames

Detection Strategies

  • Implement network monitoring to detect requests from LangChain application servers to internal IP ranges or metadata services
  • Deploy web application firewalls (WAF) with rules to block SSRF patterns in outbound requests
  • Enable detailed logging for all RequestsToolkit operations and monitor for anomalous URL patterns
  • Use runtime application self-protection (RASP) solutions to detect and block SSRF attempts at the application layer

Monitoring Recommendations

  • Configure alerts for any outbound connections from AI agent servers to RFC 1918 private address spaces
  • Monitor cloud provider logs (AWS CloudTrail, Azure Activity Logs) for metadata service access from unexpected sources
  • Establish baseline network behavior for LangChain applications and alert on deviations
  • Implement DNS query logging to detect resolution attempts for internal hostnames from application servers

How to Mitigate CVE-2025-2828

Immediate Actions Required

  • Upgrade langchain-community to version 0.0.28 or later immediately
  • Audit all deployments using RequestsToolkit to identify vulnerable instances
  • Implement network-level controls to restrict outbound requests from application servers to internal addresses
  • Review application logs for evidence of SSRF exploitation attempts

Patch Information

The vulnerability has been fixed in langchain-community version 0.0.28. The patch introduces an allow_dangerous_requests parameter that defaults to False, requiring explicit opt-in for potentially dangerous request behavior. When the parameter is not set to True, the toolkit will raise a ValueError with a security warning, preventing inadvertent exposure to SSRF attacks.

The fix was implemented in commit e188d4ecb085d4561a0be3c583d26aa9c2c3283f.

Workarounds

  • Deploy a proxy server that filters outbound requests and blocks access to internal addresses and metadata endpoints
  • Implement application-level URL validation before passing URLs to RequestsToolkit
  • Use network segmentation to isolate LangChain applications from sensitive internal resources
  • Configure firewall rules to prevent application servers from making requests to internal IP ranges
bash
# Configuration example - Upgrade to patched version
pip install --upgrade langchain-community>=0.0.28

# Verify installed version
pip show langchain-community | grep Version

# If upgrade is not immediately possible, implement proxy-based filtering
# Example: Configure environment variable for proxy
export HTTP_PROXY="http://security-proxy.internal:8080"
export HTTPS_PROXY="http://security-proxy.internal:8080"

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 Score10.0

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-918
  • Technical References
  • Huntr Bounty Notification
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-27795: LangChain RecursiveUrlLoader SSRF Bypass

  • CVE-2026-26019: LangChain RecursiveUrlLoader SSRF Vulnerability

  • CVE-2026-26013: LangChain 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