{"answers":{"affected":"4 open source packages ship an affected version, including langchain and langchain-exa. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-0243 exists.","fix":"Upgrade langchain to 0.1.0 or later.","what":"CVE-2024-0243 is a low-severity server-side request forgery vulnerability in langchain-ai/langchain, published on 24 Feb 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-0243 and fix it if it is affected.\n\nWhat it is: CVE-2024-0243 is a low-severity server-side request forgery vulnerability in langchain-ai/langchain, published on 24 Feb 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-0243 exists.\n\nAffected packages and fixed versions:\n- langchain (PyPI): affected all versions; fixed in 0.1.0\n- langchain (PyPI): affected all versions; fixed in 0.1.0\n- langchain (PyPI): affected all versions; fixed in 0.1.0\n- langchain-exa (PyPI): affected all versions; fixed in 0.1.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-0243/ (Markdown: https://insights.sbomify.com/CVE-2024-0243/index.md)","id":"CVE-2024-0243","markdown":"https://insights.sbomify.com/CVE-2024-0243/index.md","name":"CVE-2024-0243","record":{"aliases":["GHSA-h9j7-5xvc-qhg5","PYSEC-2024-235","PYSEC-2026-1509"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"LangChain Python library","requires_auth":"high_privilege","summary":"Attackers can bypass URL restrictions in LangChain's RecursiveUrlLoader to fetch arbitrary external resources, potentially exposing internal data.","user_interaction":"required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"langchain","vendor":"langchain"}],"cvss":{"score":3.7,"severity":"low","source":"cna","vector":"CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N","version":"3.0"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"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","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Server-side Request Forgery In Recursive URL Loader","id":"CVE-2024-0243","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"ssrf","year":"2024"},"n_packages":4,"n_references":3,"next":{"headline":"Memory corruption in C1333iF","id":"CVE-2024-0244"},"packages":[{"ecosystem":"PyPI","fixed":["0.1.0"],"introduced":["0"],"last_affected":[],"package":"langchain","purl":null,"source":"GHSA-h9j7-5xvc-qhg5"},{"ecosystem":"PyPI","fixed":["0.1.0"],"introduced":["0"],"last_affected":[],"package":"langchain","purl":"pkg:pypi/langchain","source":"GHSA-h9j7-5xvc-qhg5"},{"ecosystem":"PyPI","fixed":["0.1.0"],"introduced":["0"],"last_affected":[],"package":"langchain","purl":"pkg:pypi/langchain","source":"PYSEC-2026-1509"},{"ecosystem":"PyPI","fixed":["0.1.0"],"introduced":["0"],"last_affected":[],"package":"langchain-exa","purl":"pkg:pypi/langchain-exa","source":"PYSEC-2024-235"}],"prev":{"headline":"Unauthorized access to settings in Qolsys IQ Panel 4 and IQ4 Hub","id":"CVE-2024-0242"},"products":["langchain-ai/langchain"],"published":"2024-02-24","related":[{"cvss_score":9.8,"headline":"Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library","id":"CVE-2023-39631","kev_date_added":null,"published":"2023-09-01"},{"cvss_score":9.8,"headline":"langchain vulnerable to arbitrary code execution","id":"CVE-2023-36281","kev_date_added":null,"published":"2023-08-22"},{"cvss_score":9.8,"headline":"LangChain vulnerable to arbitrary code execution","id":"CVE-2023-38860","kev_date_added":null,"published":"2023-08-15"},{"cvss_score":9.8,"headline":"LangChain vulnerable to arbitrary code execution","id":"CVE-2023-38896","kev_date_added":null,"published":"2023-08-15"},{"cvss_score":9.8,"headline":"LangChain vulnerable to arbitrary code execution","id":"CVE-2023-39659","kev_date_added":null,"published":"2023-08-15"},{"cvss_score":9.8,"headline":"langchain Code Injection vulnerability","id":"CVE-2023-36095","kev_date_added":null,"published":"2023-08-05"},{"cvss_score":9.8,"headline":"langchain vulnerable to arbitrary code execution","id":"CVE-2023-36188","kev_date_added":null,"published":"2023-07-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["langchain-ai"]},"summary":"Attackers can bypass URL restrictions in LangChain's RecursiveUrlLoader to fetch arbitrary external resources, potentially exposing internal data.","url":"https://insights.sbomify.com/CVE-2024-0243/"}