dalli is vulnerable to Race Condition
50
CVE Score
Medium
Race Condition
Dalli buffers request bytes in Ruby's IO write buffer, and quiet/multi blocks don't flush until they end, so a forked child inherits that buffer and Ruby flushes it when the child closes its socket even if the child never uses Dalli. A buffered write is applied twice, and a buffered non-quiet request leaves the parent's connection off by one reply, so a later read returns the previous key's value. With TLS, the child's close also sends close_notify on the shared connection and tears down the parent's session. The fix makes Dalli buffer requests itself in sync mode, discards a forked child's inherited buffer, and closes only the child's own file descriptor without a TLS shutdown.
Upgrade the dalli library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your process forks while a thread uses a shared Dalli client, such as a pre-forking server or job runner.
3.0.0 - 3.2.12
Fixed in 3.2.134.0.0 - 4.3.6
Fixed in 4.3.75.0.0 - 5.0.8
Fixed in 5.0.95.1.0 - 5.1.2
Fixed in 5.1.35.2.0 - 5.2.0
Fixed in 5.2.1dalli is vulnerable to Race Condition in versions 3.0.0 - 3.2.12, 4.0.0 - 4.3.6, 5.0.0 - 5.0.8, 5.1.0 - 5.1.2 and 5.2.0 - 5.2.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.