CVE-2026-87874 PUBLISHED

Community.general: community.general: memcached cache plugin deserializes untrusted pickle data from memcached, enabling cache-poisoning remote code execution on the ansible controller

Assigner: redhat
Reserved: 09.09.2026 Published: 09.09.2026 Updated: 09.09.2026

A flaw was found in the memcached cache plugin of the community.general Ansible collection. Although its documentation states that records are stored in JSON format, the plugin performs no explicit serialization and relies on python-memcached, which pickles values on write and unpickles them on read. Because memcached is unauthenticated and cache keys are predictable, an attacker able to reach a network-exposed or shared memcached instance can write a crafted pickle payload that is deserialized and executed on the Ansible controller when the poisoned fact cache is next read, leading to remote code execution.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 8.1

Product Status

Vendor Red Hat
Product Red Hat Ceph Storage 5
Versions Default: affected
Vendor Red Hat
Product Red Hat Ceph Storage 9
Versions Default: affected
Vendor Red Hat
Product Red Hat OpenStack Platform 17.1
Versions Default: affected
Vendor Red Hat
Product Red Hat OpenStack Platform 18.0
Versions Default: affected

Workarounds

Bind memcached to localhost only (the plugin default, 127.0.0.1:11211) and never expose an unauthenticated memcached across a trust boundary; isolate the cache to the controller. Prefer the redis cache plugin (explicit JSON) or the jsonfile/yaml cache plugins where a shared/remote fact cache is required. Treat any host with write access to the fact-cache memcached as trusted to run code on the controller.

Credits

  • Red Hat would like to thank Jeong Woochang for reporting this issue.

References

Problem Types

  • Deserialization of Untrusted Data CWE