Concurrent Ruby - ReadWriteLock allows wrong-thread write release and stray read-release counter corruption
Published: June 19, 2026
SECURITY IDENTIFIERS
- CVE: CVE-2026-54906 (NVD)
- GHSA: GHSA-6wx8-w4f5-wwcr
GEM
PATCHED VERSIONS
>= 1.3.7
DESCRIPTION
Summary
Concurrent::ReadWriteLock#release_write_lock does not verify that the
calling thread acquired the write lock. Any thread with access to the
lock object can release an active write lock held by another thread. A
second writer can then enter its critical section while the first writer
is still running.
Concurrent::ReadWriteLock#release_read_lock also decrements the shared
counter even when no read lock is held. Calling it on a fresh lock
changes the counter from 0 to -1, after which normal read acquisition
raises Concurrent::ResourceLimitError.
This is a synchronization correctness issue in the public
Concurrent::ReadWriteLock API. It should not be framed as an
authorization bypass; the lock is an in-process concurrency primitive,
not an access-control boundary.
Impact
This can break the write-lock mutual exclusion guarantee and can also
leave a lock unusable after a stray read release.
The impact is local to applications that expose or misuse the manual
acquire_* / release_* APIs. If the lock protects integrity-sensitive
mutable state, wrong-thread write release can allow concurrent writers
and data races. The stray read-release path can cause denial of service
by corrupting the lock counter.
Credit
Pranjali Thakur - depthfirst (depthfirst.com)
RELATED
- https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-54906
- https://rubygems.org/gems/concurrent-ruby/versions/1.3.7
- https://github.com/ruby-concurrency/concurrent-ruby/releases/tag/v1.3.7
- https://advisories.gitlab.com/gem/concurrent-ruby/CVE-2026-54906
- https://github.com/ruby-concurrency/concurrent-ruby/security/advisories/GHSA-6wx8-w4f5-wwcr
- https://github.com/advisories/GHSA-6wx8-w4f5-wwcr
