Back to Blog
    Breach AnalysisAgent framework · Deserialization and tool guards

    CrewAI Guard Bypasses: Untrusted Tool Definitions, 'Read-Only' SQL and Filesystem Containment

    9 min readAndeavour Research
    123✓5ATTACK CHAINBroken by AgentGuard
    Illustration: CrewAI Guard Bypasses: Untrusted Tool Definitions, 'Read-Only' SQL and Filesystem Containment
    3 paths
    independent bypasses disclosed in one CrewAI advisory, not a proven three-stage exploit chain

    Key takeaways

    • →GHSA-wp6h-6xxh-g8fp, published November 19, 2026, documents three independent issues: deserialization trust-guard bypasses, NL2SQLTool read-only SQL bypasses and FilePath containment bypasses.
    • →Affected ranges include crewai and crewai-tools through 1.15.30 and crewai-files through 1.15.43. The advisory identifies crewai 1.15.31 and crewai-files 1.15.44 as fixed releases.
    • →AgentGuard's role is independent authorization of tool provenance, database identity, filesystem scope and declared task. Runtime governance cannot make unsafe deserialization universally safe, so patching remains mandatory.
    Attack chain, and where it breaks
    1. 1

      An untrusted tool, checkpoint, SQL request or file path reaches an affected CrewAI component

    2. 2

      One of three independent framework guards is bypassed

    3. 3

      The framework performs an import, SQL operation or path resolution outside the intended restriction

    4. 4

      The agent reaches an action using its existing environment and credentials

      AgentGuard independently authorizes the Principal, tool provenance and declared task; database and OS boundaries enforce least privilege

    5. 5

      Impact depends on the permissions granted to that runtime and tool identity

    Affected
    CrewAI deployments using affected deserialization, NL2SQLTool or FilePath functionality
    When
    Advisory published November 19, 2026
    Impact
    Depending on the independent path used: unsafe dynamic import or callable resolution, SQL outside read-only intent, or filesystem access outside intended containment

    Three bypasses, not one combined exploit

    The first issue concerns BaseTool deserialization. An untrusted serialized tool or checkpoint could provide an unknown dotted tool_type that _resolve_tool_dict() passed to importlib.import_module() without the intended CREWAI_DESERIALIZE_CALLBACKS trust guard. The same path could pre-resolve a serialized cache_function string into a callable before the validator's environment-variable check.

    The second issue is separate: crafted SQL could bypass NL2SQLTool's read-only validation. The third concerns FilePath containment. A symlinked parent directory or a sibling directory sharing the working-directory string prefix could defeat the check. The fix resolves paths and uses Path.is_relative_to(cwd).

    These paths must not be marketed as one demonstrated end-to-end compromise. The advisory does not establish in-the-wild exploitation or universal remote code execution from every dynamic import. It also does not turn the filesystem change into a complete working-directory sandbox: the linked fix still allows plain absolute paths outside the working directory by design.

    Why framework flags are not enough

    Agent frameworks optimize for flexible composition. Tools are serialized, imported, cached and connected to data stores. Security controls implemented as convenient framework flags sit inside that same flexible system and can inherit its parsing and trust assumptions.

    A read-only label does not change the database user's privileges. A path-prefix comparison does not establish filesystem confinement. A deserialization setting does not prove that a serialized object is trustworthy. Effective controls need an independent identity and enforcement boundary beneath or beside the framework.

    • Dynamic imports execute during object construction, before later tool policy may run
    • Read-only SQL intent should also be enforced by the database identity
    • Resolved paths and OS permissions are stronger than string prefixes
    • Serialized tools need provenance, not merely a type name

    How AgentGuard would reduce the blast radius

    AgentGuard inventories the Principals that create and command agents and records which tools, credentials and data each agent is meant to use. A serialized tool introduced from an unapproved source does not inherit blanket trust simply because the framework loaded it.

    For database activity, AgentGuard evaluates the agent, Principal and declared task independently of the NL2SQLTool label, while the database account enforces genuine read-only permissions. For file activity, task-bound policy limits the approved resources, and OS or container controls provide the final containment boundary.

    Timing matters. A runtime tool-policy check may be too late for code executed by importlib during deserialization. AgentGuard can govern provenance and launch authorization before untrusted tool definitions enter the runtime, but the safe first action is still to install the fixed CrewAI releases and remove untrusted serialized inputs.

    What to do now

    Upgrade each affected component and verify the actual credentials and sandbox beneath the framework.

    • Upgrade crewai to 1.15.31 and crewai-files to 1.15.44 or later
    • Confirm the corresponding fixed crewai-tools release before upgrading
    • Use genuinely read-only database identities for NL2SQL workflows
    • Reject untrusted serialized tools and enforce resolved-path and OS boundaries

    The lesson

    An agent's valid session does not make every action legitimate. A framework's safety option is useful only when independent identity, database and operating-system controls enforce the same restriction. AgentGuard adds an independent control plane around agents, their Principals, their tools and their declared tasks, so a framework decision is not the only decision that matters. The advisories themselves still need to be patched or the malicious package removed.

    Frequently asked questions

    Are the CrewAI deserialization, SQL and filepath issues one attack chain?

    No. GHSA-wp6h-6xxh-g8fp documents three independent bypasses. They should not be described as a demonstrated three-stage exploit or as confirmed exploitation against customers.

    Which CrewAI versions contain fixes for these bypasses?

    The advisory identifies crewai 1.15.31 and crewai-files 1.15.44 as fixed releases. It lists crewai and crewai-tools through 1.15.30 and crewai-files through 1.15.43 as affected; confirm the corresponding tools release during remediation.

    How would AgentGuard help secure CrewAI tools?

    AgentGuard adds tool provenance, Principal and task authorization around the agent, while database identities and OS controls enforce real least privilege. It does not replace the CrewAI patches or claim to make every unsafe dynamic import safe.

    See AgentGuard on your own environment

    Zero integration. Live in days. We'll show you what your current stack is missing.