CVE-2024-3095: SSRF in Langchain Web Research Retriever in langchain-ai/langchain
A Server-Side Request Forgery (SSRF) vulnerability exists in the Web Research Retriever component in langchain-community (langchain-community.retrievers.webresearch.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
Other sources
A Server-Side Request Forgery (SSRF) vulnerability exists in the Web Research Retriever component of langchain-ai/langchain version 0.1.5. 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.
— NVD
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-3095?
CVE-2024-3095 is classified as a high severity vulnerability due to its potential for exploitation via Server-Side Request Forgery.
How do I fix CVE-2024-3095?
To mitigate CVE-2024-3095, update the langchain-community package to version 0.2.9 or later.
Which versions of langchain-community are affected by CVE-2024-3095?
Versions of langchain-community from 0.1.5 up to but not including 0.2.9 are affected by CVE-2024-3095.
What type of vulnerability is CVE-2024-3095?
CVE-2024-3095 is categorized as a Server-Side Request Forgery (SSRF) vulnerability.
What component in langchain-community is vulnerable in CVE-2024-3095?
The vulnerability in CVE-2024-3095 exists in the Web Research Retriever component of langchain-community.