CVE-2024-0243: langchain - Server Side Request Forgery
- Cve: CVE-2024-0243
- Name: langchain - Server Side Request Forgery
- Description: With the following crawler configuration: ```python from bs4 import BeautifulSoup as Soup url = "https://example.com" loader = RecursiveUrlLoader( url=url, max_depth=2, extractor=lambda x: Soup(x, "html.parser").text ) docs = loader.load() ``` An attacker in control of the contents of `https://example.com` could place a malicious HTML file in there with links like "https://example.completely.different/my_file.html" and the crawler would proceed to download that file as well even though `prevent_outside=True`. https://github.com/langchain-ai/langchain/blob/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22/libs/community/langchain_community/document_loaders/recursive_url_loader.py#L51-L51 Resolved in https://github.com/langchain-ai/langchain/pull/15559
- Impact: Attackers can cause the loader to download malicious or unintended external content, leading to security risks or resource exhaustion.
- Remediation: Update to version with fix from PR https://github.com/langchain-ai/langchain/pull/15559, ensuring proper URL validation and handling of prevent_outside parameter.
- Vulnerability type: server_side_request_forgery
- Vulnerability impact: denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00517
- Epss percentile: 0.44841
- Assignee: [email protected]
- Published at: 2024-02-26T16:27:49Z
- Age in days: 1002
- Modified at: 2026-06-17T06:53:04Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-0243
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-918 | Server-Side Request Forgery |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861 | nvd | 2024-02-26 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/langchain-ai/langchain/commit/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22 | Patch |
| https://github.com/langchain-ai/langchain/pull/15559 | Issue Tracking, Patch |
| https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861 | Exploit, Issue Tracking, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| langchain:langchain | < 0.1.0 | no | nvd | /v1/products/langchain/langchain |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| langchain-ai/langchain | commit, fix, package, pull | yes | /v1/repositories/langchain-ai/langchain |
Index
- Repositories: 553
- Repositories high signal: 263
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2024-02-26
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts