Skip to content

[Security] RCE via Pickle Deserialization in Brain.load() #3691

Description

@bogdancherniy11-sudo

brain.py:190 uses FAISS.load_local() with allow_dangerous_deserialization=True. Any brain directory with a crafted index.pkl gives arbitrary code execution when loaded via Brain.load().

Attack vector: shared brain files via HuggingFace Hub, GitHub, email.

PoC: create brain dir with malicious pickle in index.pkl, victim calls Brain.load(path) = RCE.

Fix: remove allow_dangerous_deserialization=True or use FAISS native format instead of pickle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions