CVE-2025-2828: langchain-ai/langchain · Server-Side Request Forgery (SSRF)
Affects langchain-ai/langchainSource CVE Database V5
Not known to be exploited · 21% EPSS · CVSS 8.4 High : upgrade to 0.0.28 soon.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 21.0% chance of exploitation in 30 days – higher than 97% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.0.28
CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 23 Jun 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade langchain-ai/langchain to 0.0.28.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIlangchain-ai/langchainpkg:pypi/langchain-ai/langchainOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
1. Immediate upgrade to langchain-ai/langchain version 0.0.28 or later, where the SSRF vulnerability has been fixed, is the primary mitigation step. 2. Implement strict network egress filtering on servers running langchain to restrict outbound HTTP requests to only trusted and necessary destinations, preventing unauthorized access to internal or cloud metadata endpoints. 3. Employ application-layer controls to validate and sanitize any user inputs or parameters that influence outbound requests within the RequestsToolkit to prevent injection of malicious URLs. 4. Monitor and log outbound requests from applications using langchain to detect unusual patterns indicative of SSRF exploitation attempts, such as requests to internal IP ranges or cloud metadata IP addresses. 5. Conduct regular security audits and penetration tests focusing on SSRF vectors in applications that incorporate langchain, ensuring no residual or similar vulnerabilities exist. 6. Educate privileged users about the risks of interacting with untrusted inputs that could trigger SSRF attacks, reducing the likelihood of successful exploitation requiring user interaction. 7. For cloud deployments, enforce metadata service access controls (e.g., AWS IMDSv2 enforcement) to mitigate the impact of SSRF attacks attempting to retrieve sensitive instance metadata.
Description
A Server-Side Request Forgery (SSRF) vulnerability exists in the RequestsToolkit component of the langchain-community package (specifically, langchain_community.agent_toolkits.openapi.toolkit.RequestsToolkit) in langchain-ai/langchain version 0.0.27. This vulnerability 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 flaw 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. This issue has been fixed in version 0.0.28.