CVE Professor
/
All CVEs
CVE-2026-136146

CVE-2026-136146 — vanna-ai vanna — CWE-20 · CWE-502

MEDIUM CVSS 5.3 NVD

A security flaw has been discovered in vanna-ai vanna 2.0.0/2.0.1/2.0.2. Affected by this vulnerability is the function _load_index of the file src/vanna/integrations/faiss/agent_memory.py of the component FAISS AgentMemory Integration. Performing a manipulation results in deserialization. The attack needs to be approached locally. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.

A security flaw has been discovered in vanna-ai vanna 2.0.0/2.0.1/2.0.2. Affected by this vulnerability is the function _load_index of the file src/vanna/integrations/faiss/agent_memory.py of the component FAISS AgentMemory Integration. Performing a manipulation results in deserialization. The attack needs to be approached locally. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Attack Vector Local AV:L
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity Low I:L
Availability Low A:L
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Local Deserialization of Untrusted Data flaw (CWE-502) combined with Improper Input Validation (CWE-20) in the vanna-ai library, specifically within the FAISS integration module.

Technical Breakdown:

  • Location: src/vanna/integrations/faiss/agent_memory.py, function _load_index.

  • Mechanism: The _load_index function is responsible for loading pre-computed vector indices from disk (typically .faiss or .index files) into memory. The vulnerability arises because this function likely uses a deserialization method (such as Python's pickle, shelve, or a custom binary loader) that does not sufficiently validate the integrity or origin of the data being loaded.

  • The Flaw: If an attacker can place a maliciously crafted index file in the directory where vanna expects to find its memory indices, and then trigger the _load_index function (e.g., by starting the agent or reloading memory), the deserialization process will execute arbitrary code embedded within the malicious file.

  • Why Local (AV:L)? The attack vector is Local because the attacker must have write access to the filesystem location where the FAISS index files are stored. This typically implies the attacker already has low-privileged local access (e.g., a compromised service account, a local user on the same host, or a container escape scenario where the volume is mounted).
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Identify Software: Use pip list | grep vanna or inspect requirements.txt/pyproject.toml to confirm vanna-ai version is 2.0.0, 2.0.1, or 2.0.2.
  • Locate Data Directory: Identify the path where vanna stores its FAISS indices. By default, this is often a local directory like ./faiss_index/ or a user-defined path in the configuration.
  • Verify Permissions: Confirm that the current user (or the service account running the application) has read access to this directory, and that the attacker has write access to it (or can overwrite existing files).
  • 2. Exploitation

    The attacker crafts a malicious Python pickle file that contains a payload to execute a system command upon deserialization.

    Illustrative PoC (Python):

    import pickle
    import os
    
    class Exploit:
        def __reduce__(self):
            # This will execute 'id' when the object is unpickled
            return (os.system, ('id > /tmp/pwned.txt',))
    
    # Create a malicious pickle file
    with open('malicious_index.faiss', 'wb') as f:
        pickle.dump(Exploit(), f)

    Deployment:
    1. The attacker writes malicious_index.faiss to the target directory, replacing or adding to the existing index files.
    2. The attacker triggers the application to load the index. This could be done by:
    * Restarting the service.
    * Calling an API endpoint that initializes the agent memory (e.g., POST /api/agent/init).
    * Waiting for an automatic reload if the application monitors file changes.

    Note: The exact filename expected by _load_index depends on the application's configuration. If the application expects index.faiss, the attacker must overwrite that specific file.

    3. Post-exploitation

  • Code Execution: When _load_index calls pickle.load() on the malicious file, the __reduce__ method of the Exploit class is invoked, executing the os.system command.
  • Privilege Escalation: If the application runs as root or a privileged service account, the attacker gains those privileges.
  • Persistence: The attacker can modify the application code, create a new user, or install a rootkit.
  • Data Exfiltration: With code execution, the attacker can read sensitive data (API keys, user data) from the environment variables or filesystem.
  • 🌍 Real World Impact

  • Confidentiality (C:L): Low impact. The attacker can read files accessible to the service account, potentially exposing API keys, database credentials, or user data stored on the same host.
  • Integrity (I:L): Low impact. The attacker can modify application files, configuration, or data.
  • Availability (A:L): Low impact. The attacker can crash the application by corrupting the index file or consuming resources.
  • Practical Consequences:
  • * Compromised AI Agents: If vanna is used in a production AI pipeline, the attacker can manipulate the agent's memory, leading to incorrect or malicious responses. * Lateral Movement: If the host is part of a larger network, the attacker can use the compromised host to pivot to other systems. * Supply Chain Risk: If vanna is used in a SaaS platform, a single compromised instance could affect multiple customers if data is shared or if the attacker can exfiltrate customer data.

    🛡️ Remediation & Mitigation

    1. Upgrade

  • Affected Versions: 2.0.0, 2.0.1, 2.0.2.
  • Recommendation: Upgrade to the latest version of vanna-ai where the _load_index function has been patched to validate the integrity of the index file (e.g., using a secure serialization format or verifying checksums).
  • Command: pip install --upgrade vanna-ai
  • 2. Workarounds

  • Disable FAISS Integration: If FAISS is not strictly required, disable the FAISS AgentMemory component in the configuration.
  • Restrict Filesystem Permissions: Ensure that the directory containing FAISS index files is writable only by the application service account and not by any other local users.
  • chown -R appuser:appgroup /path/to/faiss_index
        chmod 750 /path/to/faiss_index
  • Use Secure Serialization: If you cannot upgrade immediately, modify the _load_index function to use a safer deserialization method (e.g., json if the format allows, or verify the file signature before loading).
  • 3. Detection

  • File Integrity Monitoring (FIM): Monitor the FAISS index directory for unexpected file creation or modification.
  • * Tool: auditd, osquery, or Tripwire. Rule: Alert on any write operation to .faiss or *.index files outside of the application's normal update cycle.
  • Process Monitoring: Monitor for unexpected child processes spawned by the Python application.
  • * Tool: sysmon, auditd. * Rule: Alert if the Python process spawns /bin/sh, /bin/bash, or other shell interpreters.
  • Log Analysis: Check application logs for errors related to deserialization or unexpected file access.
  • ⚠️ Urgency

  • CVSS Score: 5.3 (Medium)
  • CISA KEV: No
  • Exploit Availability: Public
  • Priority: Medium-High
  • Reasoning: While the CVSS score is medium, the combination of a public exploit and the potential for code execution makes this a significant risk, especially in environments where local access is not strictly controlled. If you are running vanna-ai in a production environment with local access from multiple users or services, treat this as High priority. Patch immediately.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
5.3 / 10 · CVSS MEDIUM
Weakness Types (CWE)
References & Advisories (4)
Related CVEs
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros
9.2
CVE-2026-115991
Exposure of sensitive information in the content lock-check endpoints (PUT /api/content/canLock and GET /api/v
8.7
CVE-2026-132098
Deserialization of untrusted data in the XStream reader used for push publishing bundles (XStreamHandler) in d
8.5
CVE-2026-144447
MassCube before 1.2.23 contains an insecure deserialization vulnerability that allows attackers to execute cod
8.5
CVE-2026-144450
galpy through 1.12.2 contains an insecure deserialization vulnerability that allows attackers to execute code
8.5
CVE-2026-144451
VIP (vip-hci) through 2.1.2 contains an unsafe deserialization vulnerability in Saveable.load that allows atta
8.2
CVE-2026-144623
Micronaut core HTTP client 4.10.24 through 4.10.37 and 5.0.1 through 5.3.0 contains a credential leak vulnerab