Commit 604dfe2
authored
community[patch]: Force opt-in for WebResearchRetriever (CVE-2024-3095) (#24451)
This PR addresses the issue raised by (CVE-2024-3095)
https://huntr.com/bounties/e62d4895-2901-405b-9559-38276b6a5273
Unfortunately, we didn't do a good job writing the initial report. It's
pointing at both the wrong package and the wrong code.
The affected code is the Web Retriever not the AsyncHTMLLoader, and the
WebRetriever lives in langchain-community
The vulnerable code lives here:
https://github.com/langchain-ai/langchain/blob/0bd3f4e1292c085f22bef1fff16059851e11d042/libs/community/langchain_community/retrievers/web_research.py#L233-L233
This PR adds a forced opt-in for users to make sure they are aware of
the risk and can mitigate by configuring a proxy:
https://github.com/langchain-ai/langchain/blob/0bd3f4e1292c085f22bef1fff16059851e11d042/libs/community/langchain_community/retrievers/web_research.py#L84-L841 parent f101c75 commit 604dfe2
File tree
1 file changed
+30
-1
lines changed- libs/community/langchain_community/retrievers
1 file changed
+30
-1
lines changedLines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
84 | 113 | | |
85 | 114 | | |
86 | 115 | | |
| |||
0 commit comments