Web3 Smart Contract Auditor
Audited by Socket on Aug 3, 2026
3 alerts found:
SecurityAnomalyx2This is a largely standard RAG retrieval/reranking component, but it contains a critical supply-chain/runtime security footgun: it loads bm25_dump.pkl using pickle.load without integrity/authenticity verification. If an attacker can influence bm25_dump.pkl, the code path can result in arbitrary code execution. Aside from this, the main additional concerns are that retrieved chunk text and metadata are propagated into build_context() (prompt injection/privacy risk in downstream LLM usage) and that it delegates to external embedding/vector-store/reranker components whose network behavior is not shown in this snippet.
No clear evidence of intentional malware (no obfuscated payloads, no eval/exec, no subprocesses, no reverse shells, no direct credential harvesting beyond using a provided Jina API key for a known extraction service). The main security concerns are supply-chain/environment privacy and data exposure: the code can read many local file types and can make outbound requests to arbitrary user-provided URLs, including sending URLs to a third-party (`r.jina.ai`) for extraction (potential unintended disclosure of which resources are being fetched and what content is returned into `LoadedDoc.text`).
This module is primarily a RAG indexing component. It does not show explicit malware behavior (no obvious backdoor/exfiltration/reverse shell in the fragment). However, it uses unsafe deserialization (pickle.load) on a local file under config.rag_dir. If an attacker can influence the pickle file contents or the rag_dir path/placement, this creates a serious arbitrary code execution risk. Additional moderate concerns include broad exception suppression around pickle operations and potential information leakage via printing d.source.