CVE-2026-87874Community.general: community.general: memcached cache plugin deserializes untrusted…
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.
What to do
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | ansible | Fix pending | UBUNTU-CVE-2026-87874 | |
| Ubuntu 26.10 | ansible-core | Fix pending | UBUNTU-CVE-2026-87874 | |
| Ubuntu 26.04 | ansible | Under investigation | UBUNTU-CVE-2026-87874 | |
| Ubuntu 26.04 | ansible-core | Under investigation | UBUNTU-CVE-2026-87874 | |
| Ubuntu 24.04 | ansible | Under investigation | UBUNTU-CVE-2026-87874 | |
| Ubuntu 24.04 | ansible-core | Under investigation | UBUNTU-CVE-2026-87874 | |
| Ubuntu 22.04 | ansible | Fix pending | UBUNTU-CVE-2026-87874 | |
| Ubuntu 22.04 | ansible-core | Under investigation | UBUNTU-CVE-2026-87874 | |
| Ubuntu 20.04 | ansible | Fix pending | UBUNTU-CVE-2026-87874 | |
| Ubuntu 18.04 | ansible | Fix pending | UBUNTU-CVE-2026-87874 | |
| Ubuntu 16.04 | ansible | Fix pending | UBUNTU-CVE-2026-87874 | |
| Ubuntu 14.04 | ansible | Fix pending | UBUNTU-CVE-2026-87874 | |
| Debian 14 | ansible | Fix pending | DEBIAN-CVE-2026-87874 | |
| Debian 13 | ansible | Fix pending | DEBIAN-CVE-2026-87874 | |
| Debian 12 | ansible | Fix pending | DEBIAN-CVE-2026-87874 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Red Hat Ceph Storage 5
- Red Hat Ceph Storage 9
- Red Hat OpenStack Platform 17.1
- Red Hat OpenStack Platform 18.0
Workaround: 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.
References
- https://access.redhat.com/security/cve/CVE-2026-87874
- https://bugzilla.redhat.com/show_bug.cgi?id=2530995
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.