PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet
Vulnerability DatabaseGHSA-w39f-xq2m-4g8x

GHSA-w39f-xq2m-4g8x: 
Ruby vulnerability analysis and mitigation

Summary

Dalli buffered request bytes in Ruby's IO write buffer (sync = false), and quiet (multi) blocks don't flush until they end. When the process forks, the child inherits the buffer, and Ruby flushes it when the child closes or finalizes the socket, even if the child never uses Dalli. The request is sent twice.

Impact

  • A buffered write is applied twice (for example one incr increments by 2).
  • A buffered non-quiet request leaves the parent's connection off by one reply, so later reads return the previous key's value.
  • With TLS, the child's close sends close_notify on the shared connection and tears down the parent's session. Applications that fork while threads use a shared client are affected (pre-forking servers, job runners).

Affected versions

  • Duplicated requests and the off-by-one connection: 4.2.0 and later (earlier versions don't buffer writes in Ruby).
  • TLS session teardown: all versions with TLS.

Fix

Dalli buffers requests itself with the socket in sync mode, a forked child discards that buffer, and a forked child closes only its own file descriptor, without a TLS shutdown. Fixed in 5.2.1, 5.1.3, 5.0.9, 4.3.6 and 3.2.12.

Incomplete fix in 4.3.6 and 3.2.12

Fixed in 4.3.7 and 3.2.13:

  • 4.3.6 and 3.2.12 detected a fork with a pid cache refreshed by a Process._fork hook. When another library's fork hook ran first in the child (connection_pool, loaded before Dalli as in Rails, closes its connections there), the TLS teardown still happened. Fork detection now checks Process.pid, as 5.x does.
  • 4.3.6's new write buffer kept a reference to the caller's value string with the meta protocol, so changing that string before the buffer was sent (for example, reusing one buffer inside a quiet block) changed the bytes sent. The buffer now holds a copy.

Source: NVD

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-9h43-g84r-c93mHIGH7.4
  • Ruby logoRuby
  • doorkeeper-openid_connect
NoYesOct 21, 2026
GHSA-wgw9-qhqg-8hv5MEDIUM5.3
  • Ruby logoRuby
  • sanitize
NoYesOct 21, 2026
GHSA-pq4g-8rxf-4g29MEDIUM5.3
  • Ruby logoRuby
  • crass
NoYesOct 21, 2026
GHSA-c62j-746x-gfcrMEDIUM4.8
  • Ruby logoRuby
  • doorkeeper
NoYesOct 21, 2026
GHSA-c8r6-23w7-5q9pLOWN/A
  • Ruby logoRuby
  • doorkeeper
NoNoOct 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management