{"id":"CVE-2024-0243","state":"PUBLISHED","title":"Server-side Request Forgery In Recursive URL Loader","description":"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","publishedAt":"2024-02-24T17:59:26.498Z","updatedAt":"2025-04-22T16:14:26.674Z","severity":{"score":3.7,"label":"Low","version":"3.0","vector":"CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["langchain-ai langchain-ai/langchain"],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[{"version":"unspecified","status":"affected","lessThan":"0.1.0","versionType":"custom"}]}],"references":["https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861","https://github.com/langchain-ai/langchain/commit/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22","https://github.com/langchain-ai/langchain/pull/15559"],"weaknesses":["CWE-918"],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/0xxx/CVE-2024-0243.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-0243","state":"PUBLISHED","datePublished":"2024-02-24T17:59:26.498Z","dateUpdated":"2025-04-22T16:14:26.674Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-01-04T21:47:13.281Z"},"containers":{"cna":{"title":"Server-side Request Forgery In Recursive URL Loader","descriptions":[{"lang":"en","value":"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"}],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[{"version":"unspecified","status":"affected","lessThan":"0.1.0","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861"},{"url":"https://github.com/langchain-ai/langchain/commit/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22"},{"url":"https://github.com/langchain-ai/langchain/pull/15559"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"HIGH","attackVector":"LOCAL","availabilityImpact":"NONE","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"HIGH","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","baseScore":3.7,"baseSeverity":"LOW"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-918","type":"CWE","lang":"en","description":"CWE-918 Server-Side Request Forgery (SSRF)"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2024-03-13T20:57:24.633Z"},"source":{"advisory":"370904e7-10ac-40a4-a8d4-e2d16e1ca861","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"langchain-ai","product":"langchain-ai\\/langchain","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"0.1.0","versionType":"custom"}],"cpes":["cpe:2.3:a:langchain-ai:langchain-ai\\/langchain:*:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-02-26T18:43:11.371044Z","id":"CVE-2024-0243","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-04-22T16:14:26.674Z"}},{"title":"CVE Program Container","references":[{"url":"https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861","tags":["x_transferred"]},{"url":"https://github.com/langchain-ai/langchain/commit/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22","tags":["x_transferred"]},{"url":"https://github.com/langchain-ai/langchain/pull/15559","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T17:41:16.443Z"}}]}}}