langchain-ai/langchain: Server-Side Request Forgery
CVE-2025-2828 is a critical-severity server-side request forgery vulnerability in langchain-ai/langchain from LangChain AI, with a CVSS 3.1 base score of 10.0 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 0.0.28 as the first without the flaw, so updating langchain-ai/langchain to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 21% chance of exploitation within 30 days, which is in the top 2.39% of all scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update langchain-ai/langchain to 0.0.28 or a later version.
- Update Langchain to 0.0.28 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Langchain-ai | langchain-ai/langchain | before 0.0.28 | 0.0.28 |
| Langchain | Langchain | before 0.0.28 | 0.0.28 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 10.0 | Critical | NVD |
| CVSS 3.0 | 8.4 | High | CNA (huntr.dev) |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Server-Side Request Forgery
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
How developers prevent this class of flaw
- If there is a known list of applications, IP, hostname, and/or domains to which the product is allowed to communicate, then use allowlists to ensure that outgoing requests are restricted to these known entities. The allowlists could be in the application code or possibly enforced by firewalls or network segmentation.
- If the product is expected to be able to connect to arbitrary IP addresses or domains, consider using a denylist that includes private network addresses, internal domain names, etc. The denylist could be in the application code or possibly enforced by firewalls or network segmentation.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Technical write-ups (may include proof of concept)
- huntr.com/bounties/8f771040-7f34-420a-b96b-5b93d4a99afcExploit, Third Party Advisory
Other vulnerabilities in langchain-ai/langchain
- 7.3 High severity
- 7.5 High severity
- 7.5 High severity
- 9.8 Critical severity
- 7.8 High severity
- 7.7 High severity
Recent Server-Side Request Forgery vulnerabilities
- 9.8 Critical severity
- 7.2 High severity
- 7.1 High severity
- 7.5 High severity
- 7.5 High severity
- 9.1 Critical severity
Spotted an error? Tell us.