|
| 1 | +--- |
| 2 | +layout: advisory |
| 3 | +title: 'CVE-2026-54906 (concurrent-ruby): Concurrent Ruby - ReadWriteLock allows wrong-thread |
| 4 | + write release and stray read-release counter corruption' |
| 5 | +comments: false |
| 6 | +categories: |
| 7 | +- concurrent-ruby |
| 8 | +advisory: |
| 9 | + gem: concurrent-ruby |
| 10 | + cve: 2026-54906 |
| 11 | + ghsa: 6wx8-w4f5-wwcr |
| 12 | + url: https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-54906 |
| 13 | + title: Concurrent Ruby - ReadWriteLock allows wrong-thread write release and stray |
| 14 | + read-release counter corruption |
| 15 | + date: 2026-06-19 |
| 16 | + description: |- |
| 17 | + ### Summary |
| 18 | +
|
| 19 | + `Concurrent::ReadWriteLock#release_write_lock` does not verify that the |
| 20 | + calling thread acquired the write lock. Any thread with access to the |
| 21 | + lock object can release an active write lock held by another thread. A |
| 22 | + second writer can then enter its critical section while the first writer |
| 23 | + is still running. |
| 24 | +
|
| 25 | + `Concurrent::ReadWriteLock#release_read_lock` also decrements the shared |
| 26 | + counter even when no read lock is held. Calling it on a fresh lock |
| 27 | + changes the counter from `0` to `-1`, after which normal read acquisition |
| 28 | + raises `Concurrent::ResourceLimitError`. |
| 29 | +
|
| 30 | + This is a synchronization correctness issue in the public |
| 31 | + `Concurrent::ReadWriteLock` API. It should not be framed as an |
| 32 | + authorization bypass; the lock is an in-process concurrency primitive, |
| 33 | + not an access-control boundary. |
| 34 | +
|
| 35 | + ### Impact |
| 36 | +
|
| 37 | + This can break the write-lock mutual exclusion guarantee and can also |
| 38 | + leave a lock unusable after a stray read release. |
| 39 | + The impact is local to applications that expose or misuse the manual |
| 40 | + `acquire_*` / `release_*` APIs. If the lock protects integrity-sensitive |
| 41 | + mutable state, wrong-thread write release can allow concurrent writers |
| 42 | + and data races. The stray read-release path can cause denial of service |
| 43 | + by corrupting the lock counter. |
| 44 | +
|
| 45 | + ### Credit |
| 46 | +
|
| 47 | + Pranjali Thakur - depthfirst ([depthfirst.com](<http://depthfirst.com>)) |
| 48 | + cvss_v4: 2.1 |
| 49 | + patched_versions: |
| 50 | + - ">= 1.3.7" |
| 51 | + related: |
| 52 | + url: |
| 53 | + - https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-54906 |
| 54 | + - https://rubygems.org/gems/concurrent-ruby/versions/1.3.7 |
| 55 | + - https://github.com/ruby-concurrency/concurrent-ruby/releases/tag/v1.3.7 |
| 56 | + - https://advisories.gitlab.com/gem/concurrent-ruby/CVE-2026-54906 |
| 57 | + - https://github.com/ruby-concurrency/concurrent-ruby/security/advisories/GHSA-6wx8-w4f5-wwcr |
| 58 | + - https://github.com/advisories/GHSA-6wx8-w4f5-wwcr |
| 59 | + notes: | |
| 60 | + - cvss_v4 from GHSA |
| 61 | + - CVE is reserved, but not published. |
| 62 | + - Not on nvd.nist.gov so no cvss_v2 or cvss_v3. |
| 63 | +--- |
0 commit comments