CVE-2026-87874: Ansible community.general memcached cache plugin deserialization RCE

CVE-2026-87874 · Severity: high · CVSS 8.1 · Published 2026-09-09

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.

Quick answers

Is CVE-2026-87874 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-87874 being exploited in the wild.
How severe is CVE-2026-87874?
High severity, with a CVSS score of 8.1, published 9 September 2026.
Which products and versions are affected?
Ansible community.general <UNKNOWN>.
Is there a fix for CVE-2026-87874?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-87874 attacked?
It is attacked over the network.
Am I affected by CVE-2026-87874?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.