---
title: "ReadWriteLock allows wrong-thread write release and stray read-release counter corruption"
url: https://daily.dev/posts/readwritelock-allows-wrong-thread-write-release-and-stray-read-release-counter-corruption-nsztjc8hx
source_url: https://rubysec.com/advisories/CVE-2026-54906
type: article
source: "RUBYLAND"
published: 2026-06-23T00:21:58.740Z
updated: 2026-06-23T00:32:52.016Z
tags: ["security", "ruby"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ReadWriteLock allows wrong-thread write release and stray read-release counter corruption

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 2 min read · 0 upvotes · 0 comments

## Summary

CVE-2026-54906 discloses two synchronization bugs in the concurrent-ruby gem's ReadWriteLock implementation. First, release_write_lock does not verify the calling thread owns the lock, allowing any thread to release a write lock held by another thread, breaking mutual exclusion and enabling data races. Second, release_read_lock decrements the shared counter even when no read lock is held, corrupting the counter and causing ResourceLimitError on subsequent acquisitions. Both issues affect applications using the manual acquire_*/release_* API. The fix is available in concurrent-ruby v1.3.7.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://rubysec.com/advisories/CVE-2026-54906>

## Similar posts on daily.dev

- [\`ReentrantReadWriteLock\` read-count overflow grants a write lock without exclusivity](https://daily.dev/posts/reentrantreadwritelock-read-count-overflow-grants-a-write-lock-without-exclusivity-snpr5qtyr) · RUBYLAND · 0 upvotes · 0 comments
- [Read Locks Are Not Your Friends](https://daily.dev/posts/read-locks-are-not-your-friends-rfms5918e) · Lobsters · 0 upvotes · 0 comments
- [\`AtomicReference\#update\` livelocks when the stored value is \`Float::NAN\`](https://daily.dev/posts/atomicreference-update-livelocks-when-the-stored-value-is-float-nan--tusn2etgb) · RUBYLAND · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#ruby](https://daily.dev/tags/ruby)

[View this post on daily.dev](https://daily.dev/posts/readwritelock-allows-wrong-thread-write-release-and-stray-read-release-counter-corruption-nsztjc8hx)
