Double-Free in Dragonfly's Stream Deserializer Enables Memory Corruption
Dragonfly, the in-memory data store positioned as a drop-in Redis/Memcached replacement, carries a critical double-free vulnerability (CWE-415) in the code path that deserializes Redis stream objects from RDB snapshots. The flaw lives in OpaqueObjLoader::CreateStream in src/server/rdb_load.cc and was published October 13, 2026 with a CVSS score of 9.6. Because Dragonfly ships with authentication disabled by default, any client that can reach the data port can trigger the bug with a single crafted RESTORE command over one TCP connection.
Vulnerability Details
| Attribute | Value |
|---|---|
| CVE | CVE-2026-104192 |
| Weakness | CWE-415 (Double Free) |
| CVSS 3.1 | 9.6 Critical — AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| Affected versions | Dragonfly ≤ 1.39 (before 1.40) |
| Fixed in | 1.40 |
| Privileges required | None — exploitable unauthenticated by default |
| User interaction | None |
| Known exploitation | None observed; not on CISA KEV as of publication |
How the Bug Works
The vulnerable path runs when Dragonfly loads a serialized Redis stream object — the data type backing Redis-style consumer groups. OpaqueObjLoader::CreateStream can associate a single streamNACK (a pending-entry record) with both a consumer group's global PEL (pending entries list) and a specific consumer's local PEL.
The trigger sequence:
- A crafted serialized stream contains a consumer group whose global PEL holds a NACK for stream entry ID
R. - A consumer's pending list is made to reference
Rtwice. - When the second, duplicate consumer-PEL entry for
Ris inserted, Dragonfly's cleanup logic frees the shared NACK object — then frees the same object a second time once the duplicate entry is rejected.
The result is heap allocator corruption, which can cause a crash (denial of service) or, depending on heap layout and version, potentially be leveraged toward code execution under the Dragonfly service account.
Why Default Configuration Makes This Worse
Dragonfly's RESTORE command — the normal mechanism for loading a serialized value, including streams — is available on the default data port with no authentication required out of the box. That means the attack surface isn't limited to operators who load untrusted RDB snapshots: any network-adjacent, unauthenticated client can submit a crafted stream payload directly via RESTORE and attempt to trigger the double-free.
Remediation
- Upgrade to Dragonfly 1.40 or later, which fixes the duplicate-PEL-entry handling in the stream loader.
- Enable authentication (
--requirepassor ACLs) if you cannot patch immediately — this is good practice regardless, given Dragonfly disables it by default. - Restrict network access to the Dragonfly data port to trusted hosts only; do not expose it to the open internet or untrusted internal segments.
- If you accept RDB snapshots or
RESTOREpayloads from external sources, treat them as untrusted input until patched.
Key Takeaways
- CVE-2026-104192 is a CVSS 9.6 double-free in Dragonfly's stream RDB deserialization logic, triggered by a crafted serialized stream with a duplicated consumer-PEL reference.
- Because Dragonfly disables authentication by default, the bug is reachable by any unauthenticated client that can connect to the data port.
- The fix ships in Dragonfly 1.40 — there is no documented workaround beyond restricting access or enabling auth.
- No in-the-wild exploitation has been reported, and the flaw is not yet on CISA's KEV catalog, but the low complexity and lack of required privileges make rapid patching worthwhile.