/

CVE-2026-33233

Severity:

HIGH RISK

(7.6)

Unsafe Deserialization in AutoGPT Backend Cache

CVE-2026-33233

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-94, CWE-345, CWE-502

Impact:

Remote Code Execution via Cache Poisoning

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

AutoGPT backend versions 0.6.34 through 0.6.51 deserialize Redis cache entries using Python's pickle.loads on untrusted bytes without any integrity or authenticity checks.

If an attacker can poison or control a shared Redis cache key, this unsafe deserialization can lead to arbitrary code execution within the backend container, compromising confidentiality, integrity, and availability of the system.

Affected context

The vulnerability arises in AutoGPT deployments where the backend uses Redis as a shared cache and stores complex Python objects using pickle.

The write path uses pickle.dumps to serialize values into Redis, while the read path unconditionally calls pickle.loads on the retrieved bytes.

Environments are most exposed when Redis is shared across services or tenants, not strongly isolated, or reachable from untrusted or semi-trusted components that can write or overwrite cache keys used by the backend.

Exploit preconditions

  • Attack surface: Redis-backed cache used by the AutoGPT backend.
  • Required access: Ability to create, modify, or overwrite Redis keys that the backend will later read and deserialize.

This could stem from misconfigured Redis access, shared-cache usage across services, or any path that lets untrusted input reach Redis.

  • Trigger point: Backend code path that fetches a value from Redis and immediately calls pickle.loads on the returned bytes.
  • Why exploitation is possible: Python's pickle format is code-capable; by design it can construct arbitrary objects and execute attacker-controlled behaviors during deserialization.

Without HMAC/signature verification, origin checks, or schema validation, the backend cannot distinguish legitimate serialized objects from malicious payloads.

Why this happens

The core issue is the use of Python's pickle for deserializing data that is not guaranteed to be fully trusted.

Pickle is a general-purpose object serialization format that can encode executable behaviors via special object constructors.

When the backend calls pickle.loads on bytes from Redis without first verifying integrity (e.g., HMAC/signature), authenticity (trusted producer), or constraining what types may be constructed, it violates the expectations of safe deserialization.

This maps to:

  • CWE-502: Deserialization of Untrusted Data — arbitrary objects are instantiated from data that may be controlled by an attacker.
  • CWE-94: Improper Control of Generation of Code — the deserialization mechanism effectively allows untrusted data to influence executed code.
  • CWE-345: Insufficient Verification of Data Authenticity — no mechanism ensures that cache bytes originate from legitimate producers or have not been tampered with.

Potential impact

  • Execution of arbitrary code or system commands within the AutoGPT backend container context.
  • Theft of sensitive data processed or cached by the backend, including API keys, tokens, or user content.
  • Tampering with AI workflows, agent behavior, or stored results, leading to corrupted or misleading outputs.
  • Use of the compromised backend as a pivot point to attack other internal services or infrastructure.
  • Denial of service by crashing the backend, exhausting resources, or corrupting critical cache entries.

General mitigation guidance

Effective mitigation focuses on eliminating unsafe deserialization and tightening trust boundaries around shared caches:

  • Prefer serialization formats that are not code-capable (e.g., JSON, MessagePack, or other data-only encodings) for values stored in Redis.
  • Avoid using pickle.loads on data that can be influenced by other services, tenants, or untrusted users, even indirectly.
  • Where legacy pickle usage is unavoidable, restrict it to strictly internal, non-shared channels and pair it with integrity protections such as HMACs or digital signatures validated before deserialization.
  • Implement an explicit type-allowlist or schema-based decoding layer so only expected, simple data structures are reconstructed from cache values.
  • Harden Redis usage: use separate logical databases or instances for different trust domains, and enforce authentication, authorization, and network isolation so only intended producers can write cache keys consumed by the backend.
  • Run backend components with least privilege and appropriate container sandboxing to limit the blast radius if a deserialization issue occurs.

How teams detect issues like this

Organizations can pursue multiple strategies to detect and monitor for similar vulnerabilities:

  • Static analysis and code scanning: Flag direct uses of pickle.loads, pickle.load, or equivalent dangerous deserialization APIs, especially when data originates from external stores like Redis, queues, or HTTP inputs.
  • Code review practices: During review, treat all cache and message-bus inputs as potentially untrusted and scrutinize any deserialization logic, looking for missing integrity checks, type validation, or assumptions about trust.
  • Policy enforcement: Introduce engineering guidelines or linters that prohibit unsafe deserialization libraries in shared-data paths and require the use of safer formats or wrapper APIs with built-in validation.
  • Runtime monitoring: Log and monitor unusual cache access patterns, unexpected object types, or deserialization errors, which may indicate tampering or attempted exploitation.
  • Automated tooling: Integrate SAST/IAST tools capable of tracking data flows from external caches into deserialization APIs within CI/CD pipelines to catch new unsafe patterns early.

Sources

SourceLink
github.comgithub.com/Significant-Gravitas/AutoGPT/releases/tag/autogpt-platform-beta-v0.6.52
github.comgithub.com/Significant-Gravitas/AutoGPT/security/advisories/GHSA-rfg2-37xq-w4m9

Frequently asked

questions

It can be, but only if an attacker can influence or control Redis keys consumed by the backend.

In some deployments Redis may be exposed to external networks or reachable from compromised internal services, making remote exploitation feasible.

In tightly isolated environments where only the backend can write its own cache keys, the practical risk is reduced.

An attacker needs the ability to write or overwrite values in Redis under keys that the backend later reads and deserializes with pickle.loads.

This might come from direct Redis access, a vulnerable service that writes to Redis on the attacker's behalf, or misconfigured multi-tenant caching where one tenant can influence another's keys.

The most robust fix is to eliminate code-capable deserialization for shared or untrusted data:

replace pickle with a data-only serialization format, and ensure that any data taken from caches or message queues is validated against a strict schema before use.

Where possible, wrap serialization/deserialization in a reusable, vetted library that enforces these restrictions by default.

Treat all externalized state (caches, queues, databases) as untrusted boundaries, even if they are internal to your infrastructure.

Adopt a standard practice of using non-executable serialization formats, implement integrity and authenticity checks when data crosses trust domains, and enforce coding policies or automated checks that flag unsafe deserialization APIs during development and review.

Find out what's already
exploitable in your codebase.