Executive brief
The community.general Ansible collection includes a memcached cache plugin that unsafely deserializes untrusted data from unauthenticated memcached instances. An attacker with network access to an exposed memcached server can inject malicious pickle-serialized payloads that execute arbitrary code on the Ansible controller when cached facts are read, leading to complete system compromise and potential lateral movement across managed infrastructure.
Technical details
This vulnerability is a classic unsafe deserialization flaw (CWE-502) in the memcached cache plugin of the Ansible community.general collection. Although the plugin's documentation claims records are stored in JSON, it actually relies on python-memcached, which uses Python pickle for serialization on write and deserialization on read. Because memcached is unauthenticated by default and cache keys are predictable, an attacker capable of reaching a network-exposed memcached instance can write a crafted pickle payload that gets deserialized and executed when the Ansible controller reads the poisoned fact cache. The attack requires network access to memcached and triggers automatically during normal cache reads—no user interaction needed. A fix should replace pickle-based serialization with explicit JSON encoding and never expose memcached across trust boundaries.
Affected products
- Ansible community.general <UNKNOWN>
Timeline
- 2026-09-09: disclosed
- 2026-09-09: advisory