{"id":"CVE-2024-0243","published":"2024-02-24T17:59:26Z","modified":"2025-04-22T16:14:26Z","title":"Server-side Request Forgery In Recursive URL Loader","vendor":"langchain-ai","product":"langchain-ai/langchain","tier":"tail","description":{"text":"With the following crawler configuration:\n\n```python\nfrom bs4 import BeautifulSoup as Soup\n\nurl = \"https://example.com\"\nloader = RecursiveUrlLoader(\n    url=url, max_depth=2, extractor=lambda x: Soup(x, \"html.parser\").text\n)\ndocs = loader.load()\n```\n\nAn 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`.\n\nhttps://github.com/langchain-ai/langchain/blob/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22/libs/community/langchain_community/document_loaders/recursive_url_loader.py#L51-L51\n\nResolved in https://github.com/langchain-ai/langchain/pull/15559","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.0","vector":"CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00517,"percentile":0.44879,"provenance":"source"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"references":[{"url":"https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861","tags":[]},{"url":"https://github.com/langchain-ai/langchain/commit/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22","tags":[]},{"url":"https://github.com/langchain-ai/langchain/pull/15559","tags":[]}],"priority":{"score":11.6,"factors":[{"name":"EPSS percentile","points":8.98},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[">= unspecified, < 0.1.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-02-26T18:43:11.371044Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain","vulnerableRanges":["<0.1.0"],"patched":["0.1.0"],"from":["GHSA-h9j7-5xvc-qhg5","PYSEC-2026-1509"],"provenance":"source"},{"ecosystem":"PyPI","package":"langchain-exa","vulnerableRanges":["<0.1.0"],"patched":["0.1.0"],"from":["PYSEC-2024-235"],"provenance":"source"}],"summary":{"text":"The Recursive URL Loader component of the langchain-ai/langchain product fails to keep crawling within the intended domain: even with prevent_outside=True, it follows links to external hosts and downloads their content, a server-side request forgery flaw. An attacker who controls the content of the crawled site, and whose target is a user running the crawler with the lambda extractor configuration and a max_depth of 2, can cause the loader to fetch attacker-chosen external URLs.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:00:16Z"},"euvd":{"id":"EUVD-2024-0652","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-39659","published":"2023-08-15","fixed":"0.0.325","kev":false},{"cve":"CVE-2023-32786","published":"2023-10-20","fixed":"0.0.329","kev":false},{"cve":"CVE-2024-3571","published":"2024-04-16","fixed":"0.0.353","kev":false},{"cve":"CVE-2024-0243","published":"2024-02-24","fixed":"0.1.0","kev":false},{"cve":"CVE-2024-28088","published":"2024-03-03","fixed":"0.1.11","kev":false,"link":{"from":"CVE-2024-0243","to":"CVE-2024-28088","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain","fromFixed":"0.1.0","toFixed":"0.1.11","daysApart":8}]}},{"cve":"CVE-2024-8309","published":"2024-10-29","fixed":"0.2.0","kev":false},{"cve":"CVE-2024-2965","published":"2024-06-06","fixed":"0.2.5","kev":false}],"package":"PyPI:langchain"}}