Breaking: Java4Shell (CVE-2026-114938) - Less Than 0.12% of JVMs Estimated at Risk of RCE
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

GHSA-R47X-6P6R-MVCP

Keys created by incr or decr can forge get_multi replies

Overview

Published
No date
Modified
No date
Unknown GitHub advisory
1 Registry packages
0 OS packages
0 Linux distributions
Yes Fix available
CVSS score Unknown, no score

Description

With the meta protocol, Dalli sends keys containing whitespace, control characters or non-ASCII characters base64-encoded. When incr or decr is called with an initial value and the key doesn't exist yet, memcached (verified with 1.6.45) creates the item under the decoded, raw key bytes and later echoes those raw bytes in mg replies. Dalli's pipelined get_multi parser trusted that echoed key, so a key containing CRLF split the reply header and the rest of the key was parsed as further replies. With a crafted key in the same get_multi batch, the block form of get_multi, get_multi_cas, and multi-server get_multi returned an attacker-chosen value for another requested key, which may then be deserialized with the configured serializer (Marshal by default).

Preconditions: an attacker-controlled key passed to incr or decr with an initial value, and later fetched with get_multi together with other keys. Rails' MemCacheStore escapes such characters in keys before they reach Dalli.

Affected: the meta protocol, 3.2.0 and later and 4.x with protocol: :meta, and all of 5.x.

The fixed versions create such counters with an add instead of auto-create. The new opt-in verify_reply_keys option makes multi-gets ignore replies for keys they didn't request, guarding against items created by earlier versions or other clients.

Workarounds

Keep untrusted input out of keys passed to incr/decr with an initial value (for example, hash it), or don't pass an initial value.

Source: OX vulnerability database

Severity

UNKNOWN

No CVSS vector in the source. Severity comes from the advisory.

Affected packages · 1

Packages affected by GHSA-R47X-6P6R-MVCP
EcosystemPackageVulnerableFixed in
RubyGems dalli — ~> 3.2.14~> 4.3.8~> 5.0.11~> 5.1.55.2.3

Open a package to see all its vulnerabilities.

Operating systems

No Linux distribution reports this ID.

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.