python/packages/autogen-ext/src/autogen_ext/experimental/task_centric_memory/_memory_bank.py (line 82)
python/packages/autogen-ext/src/autogen_ext/experimental/task_centric_memory/_string_similarity_map.py (line 48)
The MemoryBank and StringSimilarityMap classes use Python's pickle module for serialization/deserialization:
# _memory_bank.py line 82
with open(self.path_to_dict, "rb") as f:
self.uid_memo_dict = pickle.load(f) # VULNERABLE
# _string_similarity_map.py line 48
with open(path, "rb") as f:
self.uid_text_dict = pickle.load(f) # VULNERABLEPickle deserialization can execute arbitrary Python code when a malicious pickle file is loaded.
- Attacker controls the pickle file (via path traversal, shared filesystem, etc.)
- Pickle file contains malicious serialized object
- When loaded, arbitrary code executes
- Severity: CRITICAL
- Impact: Arbitrary code execution
- Likelihood: MEDIUM (requires file system access)
- None identified
- Replace pickle with JSON or another safe serialization format
- If pickle is required, use
RestrictedUnpicklerpattern - Add file integrity verification (HMAC signature)
- Document the risk and warn users not to use untrusted paths