CVE-2024-3095: Server-Side Request Forgery in langchain-community.retrievers.web_research.WebResearchRetriever
The `WebResearchRetriever` in `langchain-community` fetches any URL it is given, including local and internal addresses. An attacker can use it for port scans, to reach internal services, or to read cloud instance metadata. Versions below 0.2.9 are affected. Upgrade to 0.2.9 and opt in with `allow_dangerous_requests`.
Published Jun 6, 2024 · Updated Jul 24, 2024 · Analysis Nov 2, 2026
What an attacker can do
This is a server-side request forgery. WebResearchRetriever does not restrict requests to remote internet addresses, so a URL pointing at localhost, a private network host or a cloud metadata address works. Only GET requests are possible.
The advisory lists three uses: port scanning, reading responses from local services and cloud metadata, and using the research server as a proxy against third parties. With stolen cloud credentials, or a GET that changes state on an internal API, the impact goes beyond reading data. The advisory notes code execution is possible depending on the local services.
The retriever is typically driven by search results and model-chosen URLs, so a prompt or a poisoned web page can steer which addresses it fetches. The CVSS 3.0 vector needs local access and high complexity, but it carries a changed scope.
Who is affected
pip package langchain-community older than 0.2.9, in apps that use langchain_community.retrievers.web_research.WebResearchRetriever, especially on cloud hosts or inside private networks.
pip show langchain-communitylangchain-community
- Ecosystem
- PyPI
- Affected
- < 0.2.9
- Fixed in
- 0.2.9
- Check
pip show langchain-community
How to fix it
Upgrade to langchain-community 0.2.9.
pip install --upgrade "langchain-community>=0.2.9"The patched retriever takes an opt-in parameter, allow_dangerous_requests, which defaults to False. You must set it to True explicitly to acknowledge the risk. The PR also suggests mitigating with a proxy that blocks requests to local addresses. Egress filtering on the host, and enforcing IMDSv2 on cloud instances, add a second layer, though the advisory does not state those.
How to tell if you were hit
Review outbound request logs from the app for connections to loopback, RFC 1918 ranges, or 169.254.169.254. Check cloud metadata access logs for reads from the application host that you do not expect. Check where WebResearchRetriever is used and what feeds it URLs.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
A Server-Side Request Forgery (SSRF) vulnerability exists in the Web Research Retriever component in langchain-community (langchain-community.retrievers.web_research.WebResearchRetriever). The vulnerability arises because the Web Research Retriever does not restrict requests to remote internet addresses, allowing it to reach local addresses. This flaw enables attackers to execute port scans, access local services, and in some scenarios, read instance metadata from cloud environments. The vulnerability is particularly concerning as it can be exploited to abuse the Web Explorer server as a proxy for web attacks on third parties and interact with servers in the local network, including reading their response data. This could potentially lead to arbitrary code execution, depending on the nature of the local services. The vulnerability is limited to GET requests, as POST requests are not possible, but the impact on confidentiality, integrity, and availability is significant due to the potential for stolen credentials and state-changing interactions with internal APIs.
The patched code:
- Requires users to opt-in
- Suggests using a proxy to prevent requests to local addresses
Credited to eyurtsev.
Questions
- Why does 0.2.9 require `allow_dangerous_requests`?
The fix did not block local addresses. It makes users opt in knowingly, and suggests a proxy that blocks local destinations. Without the opt-in the retriever refuses to run.
- Can this send POST requests?
No. The advisory says the flaw is limited to GET requests. It still warns about stolen credentials and state-changing GETs on internal APIs.
References
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2024-3095
- https://huntr.com/bounties/e62d4895-2901-405b-9559-38276b6a5273
- https://github.com/langchain-ai/langchain/commit/604dfe2d99246b0c09f047c604f0c63eafba31e7
- https://github.com/langchain-ai/langchain/releases/tag/langchain-community%3D%3D0.2.9
- https://github.com/advisories/GHSA-q25c-c977-4cmh
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More LangChain vulnerabilities
All LangChain entriesCVE-2026-55443
LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders
medium5.1Jun 16, 2026CVE-2026-45134
LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning
high7.1May 13, 2026CVE-2026-44843
LangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad `load()` allowlists
high8.2May 8, 2026CVE-2026-40087
LangChain has incomplete f-string validation in prompt templates
medium5.3Apr 8, 2026CVE-2026-34070
LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
high7.5Mar 27, 2026CVE-2026-27795
LangChain Community: redirect chaining can lead to SSRF bypass via RecursiveUrlLoader
medium4.1Feb 25, 2026
